diff --git a/homeassistant/components/daikin/icons.json b/homeassistant/components/daikin/icons.json new file mode 100644 index 00000000000000..99dfa8efdf5258 --- /dev/null +++ b/homeassistant/components/daikin/icons.json @@ -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" + } + } + } +} diff --git a/homeassistant/components/daikin/sensor.py b/homeassistant/components/daikin/sensor.py index 9e7a181ba325a8..b890ad823f7a21 100644 --- a/homeassistant/components/daikin/sensor.py +++ b/homeassistant/components/daikin/sensor.py @@ -94,7 +94,6 @@ class DaikinSensorEntityDescription(SensorEntityDescription, DaikinRequiredKeysM DaikinSensorEntityDescription( key=ATTR_COOL_ENERGY, translation_key="cool_energy_consumption", - icon="mdi:snowflake", device_class=SensorDeviceClass.ENERGY, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, entity_registry_enabled_default=False, @@ -103,7 +102,6 @@ class DaikinSensorEntityDescription(SensorEntityDescription, DaikinRequiredKeysM DaikinSensorEntityDescription( key=ATTR_HEAT_ENERGY, translation_key="heat_energy_consumption", - icon="mdi:fire", device_class=SensorDeviceClass.ENERGY, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, entity_registry_enabled_default=False, @@ -120,7 +118,6 @@ class DaikinSensorEntityDescription(SensorEntityDescription, DaikinRequiredKeysM DaikinSensorEntityDescription( key=ATTR_COMPRESSOR_FREQUENCY, translation_key="compressor_frequency", - icon="mdi:fan", device_class=SensorDeviceClass.FREQUENCY, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfFrequency.HERTZ, diff --git a/homeassistant/components/daikin/switch.py b/homeassistant/components/daikin/switch.py index 8741898237ef94..dd157774d6eae4 100644 --- a/homeassistant/components/daikin/switch.py +++ b/homeassistant/components/daikin/switch.py @@ -11,9 +11,6 @@ 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_STREAMER = "streamer" DAIKIN_ATTR_MODE = "mode" @@ -58,8 +55,8 @@ async def async_setup_entry( class DaikinZoneSwitch(SwitchEntity): """Representation of a zone.""" - _attr_icon = ZONE_ICON _attr_has_entity_name = True + _attr_translation_key = "zone" def __init__(self, api: DaikinApi, zone_id: int) -> None: """Initialize the zone.""" @@ -94,9 +91,9 @@ async def async_turn_off(self, **kwargs: Any) -> None: class DaikinStreamerSwitch(SwitchEntity): """Streamer state.""" - _attr_icon = STREAMER_ICON _attr_name = "Streamer" _attr_has_entity_name = True + _attr_translation_key = "streamer" def __init__(self, api: DaikinApi) -> None: """Initialize streamer switch.""" @@ -127,8 +124,8 @@ async def async_turn_off(self, **kwargs: Any) -> None: class DaikinToggleSwitch(SwitchEntity): """Switch state.""" - _attr_icon = TOGGLE_ICON _attr_has_entity_name = True + _attr_translation_key = "toggle" def __init__(self, api: DaikinApi) -> None: """Initialize switch."""