Add icon translations to derivative (#109650)

This commit is contained in:
Joost Lekkerkerker 2024-02-04 23:20:46 +01:00 committed by GitHub
parent c3690e74c5
commit 0b3ed92a6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View File

@ -0,0 +1,9 @@
{
"entity": {
"sensor": {
"derivative": {
"default": "mdi:chart-line"
}
}
}
}

View File

@ -64,8 +64,6 @@ UNIT_TIME = {
UnitOfTime.DAYS: 24 * 60 * 60, UnitOfTime.DAYS: 24 * 60 * 60,
} }
ICON = "mdi:chart-line"
DEFAULT_ROUND = 3 DEFAULT_ROUND = 3
DEFAULT_TIME_WINDOW = 0 DEFAULT_TIME_WINDOW = 0
@ -157,9 +155,9 @@ async def async_setup_platform(
class DerivativeSensor(RestoreSensor, SensorEntity): class DerivativeSensor(RestoreSensor, SensorEntity):
"""Representation of an derivative sensor.""" """Representation of a derivative sensor."""
_attr_icon = ICON _attr_translation_key = "derivative"
_attr_should_poll = False _attr_should_poll = False
def __init__( def __init__(