Add and use time related constants (#32065)
* Add and use time related constants * Sort time constants and reuse them in data rate constants * Fix greeneyemonitor import * Fix greeneyemonitor import V2 * Fix failing here_travel_time test * Add TIME_MONTHS and TIME_YEARS * Use TIME_MINUTES in opentherm_gw and isy994 * Add and use TIME_MILLISECONDS * Change inconsistent ones * Add TIME_MICROSECONDS and TIME_WEEKS * Use constants in apcupsd and travisci * Fix import error in upnp sensor.py * Fix isy994 sensor.py using TIME_YEARS * Fix dyson tests * Use TIME_SECONDS in more places * Use TIME_DAYS in google wifi
This commit is contained in:
parent
8dd80e0e3c
commit
a85808e325
81 changed files with 480 additions and 287 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Constants for Brother integration."""
|
||||
from homeassistant.const import TIME_DAYS
|
||||
|
||||
ATTR_BELT_UNIT_REMAINING_LIFE = "belt_unit_remaining_life"
|
||||
ATTR_BLACK_INK_REMAINING = "black_ink_remaining"
|
||||
ATTR_BLACK_TONER_REMAINING = "black_toner_remaining"
|
||||
|
@ -28,7 +30,6 @@ ATTR_YELLOW_TONER_REMAINING = "yellow_toner_remaining"
|
|||
DOMAIN = "brother"
|
||||
|
||||
UNIT_PAGES = "p"
|
||||
UNIT_DAYS = "days"
|
||||
UNIT_PERCENT = "%"
|
||||
|
||||
PRINTER_TYPES = ["laser", "ink"]
|
||||
|
@ -127,6 +128,6 @@ SENSOR_TYPES = {
|
|||
ATTR_UPTIME: {
|
||||
ATTR_ICON: "mdi:timer",
|
||||
ATTR_LABEL: ATTR_UPTIME.title(),
|
||||
ATTR_UNIT: UNIT_DAYS,
|
||||
ATTR_UNIT: TIME_DAYS,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue