Add icon translations to aftership (#111317)

pull/111379/head
Joost Lekkerkerker 2024-02-25 10:38:17 +01:00 committed by GitHub
parent dbc4d90435
commit 70af28cc26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 4 deletions

View File

@ -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"

View File

@ -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"
}
}

View File

@ -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."""