Add icon translations to Twinkly (#112328)

This commit is contained in:
Joost Lekkerkerker 2024-03-07 12:33:28 +01:00 committed by GitHub
parent bf23672d39
commit d42dd0114d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,9 @@
{
"entity": {
"light": {
"light": {
"default": "mdi:string-lights"
}
}
}
}

View File

@ -66,7 +66,7 @@ class TwinklyLight(LightEntity):
_attr_has_entity_name = True _attr_has_entity_name = True
_attr_name = None _attr_name = None
_attr_icon = "mdi:string-lights" _attr_translation_key = "light"
def __init__( def __init__(
self, self,

View File

@ -8,7 +8,6 @@
'effect_list': list([ 'effect_list': list([
]), ]),
'friendly_name': 'twinkly_test_device_name', 'friendly_name': 'twinkly_test_device_name',
'icon': 'mdi:string-lights',
'supported_color_modes': list([ 'supported_color_modes': list([
'brightness', 'brightness',
]), ]),

View File

@ -30,9 +30,6 @@ async def test_initial_state(hass: HomeAssistant) -> None:
assert state.state == "on" assert state.state == "on"
assert state.attributes[ATTR_BRIGHTNESS] == 26 assert state.attributes[ATTR_BRIGHTNESS] == 26
assert state.attributes["friendly_name"] == TEST_NAME assert state.attributes["friendly_name"] == TEST_NAME
assert state.attributes["icon"] == "mdi:string-lights"
assert entity.original_icon == "mdi:string-lights"
assert device.name == TEST_NAME assert device.name == TEST_NAME
assert device.model == TEST_MODEL assert device.model == TEST_MODEL