Add icon translations to Intellifire (#111845)
parent
87632dcb6a
commit
eaff66477d
|
@ -39,25 +39,21 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||
IntellifireBinarySensorEntityDescription(
|
||||
key="on_off", # This is the sensor name
|
||||
translation_key="flame", # This is the translation key
|
||||
icon="mdi:fire",
|
||||
value_fn=lambda data: data.is_on,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="timer_on",
|
||||
translation_key="timer_on",
|
||||
icon="mdi:camera-timer",
|
||||
value_fn=lambda data: data.timer_on,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="pilot_light_on",
|
||||
translation_key="pilot_light_on",
|
||||
icon="mdi:fire-alert",
|
||||
value_fn=lambda data: data.pilot_on,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="thermostat_on",
|
||||
translation_key="thermostat_on",
|
||||
icon="mdi:home-thermometer-outline",
|
||||
value_fn=lambda data: data.thermostat_on,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
|
@ -77,7 +73,6 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||
IntellifireBinarySensorEntityDescription(
|
||||
key="error_fan_delay",
|
||||
translation_key="fan_delay_error",
|
||||
icon="mdi:fan-alert",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.error_fan_delay,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
|
@ -99,7 +94,6 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||
IntellifireBinarySensorEntityDescription(
|
||||
key="error_fan",
|
||||
translation_key="fan_error",
|
||||
icon="mdi:fan-alert",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.error_fan,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
|
|
|
@ -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(
|
||||
key="flame_control",
|
||||
translation_key="flame_control",
|
||||
icon="mdi:arrow-expand-vertical",
|
||||
)
|
||||
|
||||
async_add_entities(
|
||||
|
|
|
@ -57,7 +57,6 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = (
|
|||
IntellifireSensorEntityDescription(
|
||||
key="flame_height",
|
||||
translation_key="flame_height",
|
||||
icon="mdi:fire-circle",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
# UI uses 1-5 for flame height, backing lib uses 0-4
|
||||
value_fn=lambda data: (data.flameheight + 1),
|
||||
|
@ -80,14 +79,12 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = (
|
|||
IntellifireSensorEntityDescription(
|
||||
key="fan_speed",
|
||||
translation_key="fan_speed",
|
||||
icon="mdi:fan",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
value_fn=lambda data: data.fanspeed,
|
||||
),
|
||||
IntellifireSensorEntityDescription(
|
||||
key="timer_end_timestamp",
|
||||
translation_key="timer_end_timestamp",
|
||||
icon="mdi:timer-sand",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
value_fn=_time_remaining_to_timestamp,
|
||||
|
|
|
@ -45,7 +45,6 @@ INTELLIFIRE_SWITCHES: tuple[IntellifireSwitchEntityDescription, ...] = (
|
|||
IntellifireSwitchEntityDescription(
|
||||
key="pilot",
|
||||
translation_key="pilot_light",
|
||||
icon="mdi:fire-alert",
|
||||
on_fn=lambda control_api: control_api.pilot_on(),
|
||||
off_fn=lambda control_api: control_api.pilot_off(),
|
||||
value_fn=lambda data: data.pilot_on,
|
||||
|
|
Loading…
Reference in New Issue