mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add icon translations to Intellifire (#111845)
This commit is contained in:
parent
87632dcb6a
commit
eaff66477d
@ -39,25 +39,21 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||||||
IntellifireBinarySensorEntityDescription(
|
IntellifireBinarySensorEntityDescription(
|
||||||
key="on_off", # This is the sensor name
|
key="on_off", # This is the sensor name
|
||||||
translation_key="flame", # This is the translation key
|
translation_key="flame", # This is the translation key
|
||||||
icon="mdi:fire",
|
|
||||||
value_fn=lambda data: data.is_on,
|
value_fn=lambda data: data.is_on,
|
||||||
),
|
),
|
||||||
IntellifireBinarySensorEntityDescription(
|
IntellifireBinarySensorEntityDescription(
|
||||||
key="timer_on",
|
key="timer_on",
|
||||||
translation_key="timer_on",
|
translation_key="timer_on",
|
||||||
icon="mdi:camera-timer",
|
|
||||||
value_fn=lambda data: data.timer_on,
|
value_fn=lambda data: data.timer_on,
|
||||||
),
|
),
|
||||||
IntellifireBinarySensorEntityDescription(
|
IntellifireBinarySensorEntityDescription(
|
||||||
key="pilot_light_on",
|
key="pilot_light_on",
|
||||||
translation_key="pilot_light_on",
|
translation_key="pilot_light_on",
|
||||||
icon="mdi:fire-alert",
|
|
||||||
value_fn=lambda data: data.pilot_on,
|
value_fn=lambda data: data.pilot_on,
|
||||||
),
|
),
|
||||||
IntellifireBinarySensorEntityDescription(
|
IntellifireBinarySensorEntityDescription(
|
||||||
key="thermostat_on",
|
key="thermostat_on",
|
||||||
translation_key="thermostat_on",
|
translation_key="thermostat_on",
|
||||||
icon="mdi:home-thermometer-outline",
|
|
||||||
value_fn=lambda data: data.thermostat_on,
|
value_fn=lambda data: data.thermostat_on,
|
||||||
),
|
),
|
||||||
IntellifireBinarySensorEntityDescription(
|
IntellifireBinarySensorEntityDescription(
|
||||||
@ -77,7 +73,6 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||||||
IntellifireBinarySensorEntityDescription(
|
IntellifireBinarySensorEntityDescription(
|
||||||
key="error_fan_delay",
|
key="error_fan_delay",
|
||||||
translation_key="fan_delay_error",
|
translation_key="fan_delay_error",
|
||||||
icon="mdi:fan-alert",
|
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
value_fn=lambda data: data.error_fan_delay,
|
value_fn=lambda data: data.error_fan_delay,
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
@ -99,7 +94,6 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||||||
IntellifireBinarySensorEntityDescription(
|
IntellifireBinarySensorEntityDescription(
|
||||||
key="error_fan",
|
key="error_fan",
|
||||||
translation_key="fan_error",
|
translation_key="fan_error",
|
||||||
icon="mdi:fan-alert",
|
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
value_fn=lambda data: data.error_fan,
|
value_fn=lambda data: data.error_fan,
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
|
45
homeassistant/components/intellifire/icons.json
Normal file
45
homeassistant/components/intellifire/icons.json
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"flame": {
|
||||||
|
"default": "mdi:fire"
|
||||||
|
},
|
||||||
|
"timer_on": {
|
||||||
|
"default": "mdi:camera-timer"
|
||||||
|
},
|
||||||
|
"pilot_light_on": {
|
||||||
|
"default": "mdi:fire-alert"
|
||||||
|
},
|
||||||
|
"thermostat_on": {
|
||||||
|
"default": "mdi:home-thermometer-outline"
|
||||||
|
},
|
||||||
|
"fan_delay_error": {
|
||||||
|
"default": "mdi:fan-alert"
|
||||||
|
},
|
||||||
|
"fan_error": {
|
||||||
|
"default": "mdi:fan-alert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"flame_control": {
|
||||||
|
"default": "mdi:arrow-expand-vertical"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sensor": {
|
||||||
|
"flame_height": {
|
||||||
|
"default": "mdi:fire-circle"
|
||||||
|
},
|
||||||
|
"fan_speed": {
|
||||||
|
"default": "mdi:fan"
|
||||||
|
},
|
||||||
|
"timer_end_timestamp": {
|
||||||
|
"default": "mdi:timer-sand"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"pilot_light": {
|
||||||
|
"default": "mdi:fire-alert"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -28,7 +28,6 @@ async def async_setup_entry(
|
|||||||
description = NumberEntityDescription(
|
description = NumberEntityDescription(
|
||||||
key="flame_control",
|
key="flame_control",
|
||||||
translation_key="flame_control",
|
translation_key="flame_control",
|
||||||
icon="mdi:arrow-expand-vertical",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
|
@ -57,7 +57,6 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = (
|
|||||||
IntellifireSensorEntityDescription(
|
IntellifireSensorEntityDescription(
|
||||||
key="flame_height",
|
key="flame_height",
|
||||||
translation_key="flame_height",
|
translation_key="flame_height",
|
||||||
icon="mdi:fire-circle",
|
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
# UI uses 1-5 for flame height, backing lib uses 0-4
|
# UI uses 1-5 for flame height, backing lib uses 0-4
|
||||||
value_fn=lambda data: (data.flameheight + 1),
|
value_fn=lambda data: (data.flameheight + 1),
|
||||||
@ -80,14 +79,12 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = (
|
|||||||
IntellifireSensorEntityDescription(
|
IntellifireSensorEntityDescription(
|
||||||
key="fan_speed",
|
key="fan_speed",
|
||||||
translation_key="fan_speed",
|
translation_key="fan_speed",
|
||||||
icon="mdi:fan",
|
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
value_fn=lambda data: data.fanspeed,
|
value_fn=lambda data: data.fanspeed,
|
||||||
),
|
),
|
||||||
IntellifireSensorEntityDescription(
|
IntellifireSensorEntityDescription(
|
||||||
key="timer_end_timestamp",
|
key="timer_end_timestamp",
|
||||||
translation_key="timer_end_timestamp",
|
translation_key="timer_end_timestamp",
|
||||||
icon="mdi:timer-sand",
|
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
device_class=SensorDeviceClass.TIMESTAMP,
|
device_class=SensorDeviceClass.TIMESTAMP,
|
||||||
value_fn=_time_remaining_to_timestamp,
|
value_fn=_time_remaining_to_timestamp,
|
||||||
|
@ -45,7 +45,6 @@ INTELLIFIRE_SWITCHES: tuple[IntellifireSwitchEntityDescription, ...] = (
|
|||||||
IntellifireSwitchEntityDescription(
|
IntellifireSwitchEntityDescription(
|
||||||
key="pilot",
|
key="pilot",
|
||||||
translation_key="pilot_light",
|
translation_key="pilot_light",
|
||||||
icon="mdi:fire-alert",
|
|
||||||
on_fn=lambda control_api: control_api.pilot_on(),
|
on_fn=lambda control_api: control_api.pilot_on(),
|
||||||
off_fn=lambda control_api: control_api.pilot_off(),
|
off_fn=lambda control_api: control_api.pilot_off(),
|
||||||
value_fn=lambda data: data.pilot_on,
|
value_fn=lambda data: data.pilot_on,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user