mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add icon translations to Random (#109652)
This commit is contained in:
parent
f18448950c
commit
52d27230bc
@ -54,6 +54,8 @@ async def async_setup_entry(
|
||||
class RandomBinarySensor(BinarySensorEntity):
|
||||
"""Representation of a Random binary sensor."""
|
||||
|
||||
_attr_translation_key = "random"
|
||||
|
||||
def __init__(self, config: Mapping[str, Any], entry_id: str | None = None) -> None:
|
||||
"""Initialize the Random binary sensor."""
|
||||
self._attr_name = config.get(CONF_NAME)
|
||||
|
14
homeassistant/components/random/icons.json
Normal file
14
homeassistant/components/random/icons.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"random": {
|
||||
"default": "mdi:dice-multiple"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"random": {
|
||||
"default": "mdi:dice-multiple"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -65,6 +65,8 @@ async def async_setup_entry(
|
||||
class RandomSensor(SensorEntity):
|
||||
"""Representation of a Random number sensor."""
|
||||
|
||||
_attr_translation_key = "random"
|
||||
|
||||
def __init__(self, config: Mapping[str, Any], entry_id: str | None = None) -> None:
|
||||
"""Initialize the Random sensor."""
|
||||
self._attr_name = config.get(CONF_NAME)
|
||||
|
Loading…
x
Reference in New Issue
Block a user