Add icon translations to aftership (#111317)
parent
dbc4d90435
commit
70af28cc26
|
@ -22,8 +22,6 @@ CONF_TRACKING_NUMBER: Final = "tracking_number"
|
|||
DEFAULT_NAME: Final = "aftership"
|
||||
UPDATE_TOPIC: Final = f"{DOMAIN}_update"
|
||||
|
||||
ICON: Final = "mdi:package-variant-closed"
|
||||
|
||||
MIN_TIME_BETWEEN_UPDATES: Final = timedelta(minutes=15)
|
||||
|
||||
SERVICE_ADD_TRACKING: Final = "add_tracking"
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"packages": {
|
||||
"default": "mdi:package-variant-closed"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"add_tracking": "mdi:package-variant-plus",
|
||||
"remove_tracking": "mdi:package-variant-minus"
|
||||
}
|
||||
}
|
|
@ -35,7 +35,6 @@ from .const import (
|
|||
CONF_TRACKING_NUMBER,
|
||||
DEFAULT_NAME,
|
||||
DOMAIN,
|
||||
ICON,
|
||||
MIN_TIME_BETWEEN_UPDATES,
|
||||
REMOVE_TRACKING_SERVICE_SCHEMA,
|
||||
SERVICE_ADD_TRACKING,
|
||||
|
@ -135,7 +134,7 @@ class AfterShipSensor(SensorEntity):
|
|||
|
||||
_attr_attribution = ATTRIBUTION
|
||||
_attr_native_unit_of_measurement: str = "packages"
|
||||
_attr_icon: str = ICON
|
||||
_attr_translation_key = "packages"
|
||||
|
||||
def __init__(self, aftership: AfterShip, name: str) -> None:
|
||||
"""Initialize the sensor."""
|
||||
|
|
Loading…
Reference in New Issue