mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Use translation_key for entities in Huum (#149256)
This commit is contained in:
parent
7aa4810b0a
commit
52abab8ae8
@ -27,7 +27,6 @@ async def async_setup_entry(
|
||||
class HuumDoorSensor(HuumBaseEntity, BinarySensorEntity):
|
||||
"""Representation of a BinarySensor."""
|
||||
|
||||
_attr_name = "Door"
|
||||
_attr_device_class = BinarySensorDeviceClass.DOOR
|
||||
|
||||
def __init__(self, coordinator: HuumDataUpdateCoordinator) -> None:
|
||||
|
@ -32,7 +32,7 @@ async def async_setup_entry(
|
||||
class HuumLight(HuumBaseEntity, LightEntity):
|
||||
"""Representation of a light."""
|
||||
|
||||
_attr_name = "Light"
|
||||
_attr_translation_key = "light"
|
||||
_attr_supported_color_modes = {ColorMode.ONOFF}
|
||||
_attr_color_mode = ColorMode.ONOFF
|
||||
|
||||
|
@ -18,5 +18,12 @@
|
||||
"abort": {
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"light": {
|
||||
"light": {
|
||||
"name": "[%key:component::light::title%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'translation_key': 'light',
|
||||
'unique_id': 'AABBCC112233',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user