mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Add icon translations to Daikin (#111362)
This commit is contained in:
parent
18fcb14c1b
commit
5fa4be02f0
26
homeassistant/components/daikin/icons.json
Normal file
26
homeassistant/components/daikin/icons.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"cool_energy_consumption": {
|
||||||
|
"default": "mdi:snowflake"
|
||||||
|
},
|
||||||
|
"heat_energy_consumption": {
|
||||||
|
"default": "mdi:fire"
|
||||||
|
},
|
||||||
|
"compressor_frequency": {
|
||||||
|
"default": "mdi:fan"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"zone": {
|
||||||
|
"default": "mdi:home-circle"
|
||||||
|
},
|
||||||
|
"streamer": {
|
||||||
|
"default": "mdi:air-filter"
|
||||||
|
},
|
||||||
|
"toggle": {
|
||||||
|
"default": "mdi:power"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -94,7 +94,6 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
|||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_COOL_ENERGY,
|
key=ATTR_COOL_ENERGY,
|
||||||
translation_key="cool_energy_consumption",
|
translation_key="cool_energy_consumption",
|
||||||
icon="mdi:snowflake",
|
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
@ -103,7 +102,6 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
|||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_HEAT_ENERGY,
|
key=ATTR_HEAT_ENERGY,
|
||||||
translation_key="heat_energy_consumption",
|
translation_key="heat_energy_consumption",
|
||||||
icon="mdi:fire",
|
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
@ -120,7 +118,6 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
|||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_COMPRESSOR_FREQUENCY,
|
key=ATTR_COMPRESSOR_FREQUENCY,
|
||||||
translation_key="compressor_frequency",
|
translation_key="compressor_frequency",
|
||||||
icon="mdi:fan",
|
|
||||||
device_class=SensorDeviceClass.FREQUENCY,
|
device_class=SensorDeviceClass.FREQUENCY,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=UnitOfFrequency.HERTZ,
|
native_unit_of_measurement=UnitOfFrequency.HERTZ,
|
||||||
|
@ -11,9 +11,6 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||||||
|
|
||||||
from . import DOMAIN as DAIKIN_DOMAIN, DaikinApi
|
from . import DOMAIN as DAIKIN_DOMAIN, DaikinApi
|
||||||
|
|
||||||
ZONE_ICON = "mdi:home-circle"
|
|
||||||
STREAMER_ICON = "mdi:air-filter"
|
|
||||||
TOGGLE_ICON = "mdi:power"
|
|
||||||
DAIKIN_ATTR_ADVANCED = "adv"
|
DAIKIN_ATTR_ADVANCED = "adv"
|
||||||
DAIKIN_ATTR_STREAMER = "streamer"
|
DAIKIN_ATTR_STREAMER = "streamer"
|
||||||
DAIKIN_ATTR_MODE = "mode"
|
DAIKIN_ATTR_MODE = "mode"
|
||||||
@ -58,8 +55,8 @@ async def async_setup_entry(
|
|||||||
class DaikinZoneSwitch(SwitchEntity):
|
class DaikinZoneSwitch(SwitchEntity):
|
||||||
"""Representation of a zone."""
|
"""Representation of a zone."""
|
||||||
|
|
||||||
_attr_icon = ZONE_ICON
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
|
_attr_translation_key = "zone"
|
||||||
|
|
||||||
def __init__(self, api: DaikinApi, zone_id: int) -> None:
|
def __init__(self, api: DaikinApi, zone_id: int) -> None:
|
||||||
"""Initialize the zone."""
|
"""Initialize the zone."""
|
||||||
@ -94,9 +91,9 @@ class DaikinZoneSwitch(SwitchEntity):
|
|||||||
class DaikinStreamerSwitch(SwitchEntity):
|
class DaikinStreamerSwitch(SwitchEntity):
|
||||||
"""Streamer state."""
|
"""Streamer state."""
|
||||||
|
|
||||||
_attr_icon = STREAMER_ICON
|
|
||||||
_attr_name = "Streamer"
|
_attr_name = "Streamer"
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
|
_attr_translation_key = "streamer"
|
||||||
|
|
||||||
def __init__(self, api: DaikinApi) -> None:
|
def __init__(self, api: DaikinApi) -> None:
|
||||||
"""Initialize streamer switch."""
|
"""Initialize streamer switch."""
|
||||||
@ -127,8 +124,8 @@ class DaikinStreamerSwitch(SwitchEntity):
|
|||||||
class DaikinToggleSwitch(SwitchEntity):
|
class DaikinToggleSwitch(SwitchEntity):
|
||||||
"""Switch state."""
|
"""Switch state."""
|
||||||
|
|
||||||
_attr_icon = TOGGLE_ICON
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
|
_attr_translation_key = "toggle"
|
||||||
|
|
||||||
def __init__(self, api: DaikinApi) -> None:
|
def __init__(self, api: DaikinApi) -> None:
|
||||||
"""Initialize switch."""
|
"""Initialize switch."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user