diff --git a/homeassistant/components/intellifire/binary_sensor.py b/homeassistant/components/intellifire/binary_sensor.py index 5a7407836f2..b19c592a5cf 100644 --- a/homeassistant/components/intellifire/binary_sensor.py +++ b/homeassistant/components/intellifire/binary_sensor.py @@ -38,45 +38,45 @@ class IntellifireBinarySensorEntityDescription( INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...] = ( IntellifireBinarySensorEntityDescription( key="on_off", # This is the sensor name - name="Flame", # This is the human readable name + translation_key="flame", # This is the translation key icon="mdi:fire", value_fn=lambda data: data.is_on, ), IntellifireBinarySensorEntityDescription( key="timer_on", - name="Timer on", + translation_key="timer_on", icon="mdi:camera-timer", value_fn=lambda data: data.timer_on, ), IntellifireBinarySensorEntityDescription( key="pilot_light_on", - name="Pilot light on", + translation_key="pilot_light_on", icon="mdi:fire-alert", value_fn=lambda data: data.pilot_on, ), IntellifireBinarySensorEntityDescription( key="thermostat_on", - name="Thermostat on", + translation_key="thermostat_on", icon="mdi:home-thermometer-outline", value_fn=lambda data: data.thermostat_on, ), IntellifireBinarySensorEntityDescription( key="error_pilot_flame", - name="Pilot flame error", + translation_key="pilot_flame_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_pilot_flame, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_flame", - name="Flame Error", + translation_key="flame_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_flame, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_fan_delay", - name="Fan delay error", + translation_key="fan_delay_error", icon="mdi:fan-alert", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_fan_delay, @@ -84,21 +84,21 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...] ), IntellifireBinarySensorEntityDescription( key="error_maintenance", - name="Maintenance error", + translation_key="maintenance_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_maintenance, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_disabled", - name="Disabled error", + translation_key="disabled_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_disabled, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_fan", - name="Fan error", + translation_key="fan_error", icon="mdi:fan-alert", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_fan, @@ -106,35 +106,35 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...] ), IntellifireBinarySensorEntityDescription( key="error_lights", - name="Lights error", + translation_key="lights_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_lights, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_accessory", - name="Accessory error", + translation_key="accessory_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_accessory, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_soft_lock_out", - name="Soft lock out error", + translation_key="soft_lock_out_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_soft_lock_out, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_ecm_offline", - name="ECM offline error", + translation_key="ecm_offline_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_ecm_offline, device_class=BinarySensorDeviceClass.PROBLEM, ), IntellifireBinarySensorEntityDescription( key="error_offline", - name="Offline error", + translation_key="offline_error", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.error_offline, device_class=BinarySensorDeviceClass.PROBLEM, diff --git a/homeassistant/components/intellifire/fan.py b/homeassistant/components/intellifire/fan.py index debc8237fc8..3911efeb5b9 100644 --- a/homeassistant/components/intellifire/fan.py +++ b/homeassistant/components/intellifire/fan.py @@ -45,7 +45,7 @@ class IntellifireFanEntityDescription( INTELLIFIRE_FANS: tuple[IntellifireFanEntityDescription, ...] = ( IntellifireFanEntityDescription( key="fan", - name="Fan", + translation_key="fan", set_fn=lambda control_api, speed: control_api.set_fan_speed(speed=speed), value_fn=lambda data: data.fanspeed, speed_range=(1, 4), diff --git a/homeassistant/components/intellifire/light.py b/homeassistant/components/intellifire/light.py index 383d61b8d41..05994919296 100644 --- a/homeassistant/components/intellifire/light.py +++ b/homeassistant/components/intellifire/light.py @@ -40,7 +40,7 @@ class IntellifireLightEntityDescription( INTELLIFIRE_LIGHTS: tuple[IntellifireLightEntityDescription, ...] = ( IntellifireLightEntityDescription( key="lights", - name="Lights", + translation_key="lights", set_fn=lambda control_api, level: control_api.set_lights(level=level), value_fn=lambda data: data.light_level, ), diff --git a/homeassistant/components/intellifire/number.py b/homeassistant/components/intellifire/number.py index efa567d55cb..5da3c3cdbf8 100644 --- a/homeassistant/components/intellifire/number.py +++ b/homeassistant/components/intellifire/number.py @@ -27,7 +27,7 @@ async def async_setup_entry( description = NumberEntityDescription( key="flame_control", - name="Flame control", + translation_key="flame_control", icon="mdi:arrow-expand-vertical", ) @@ -54,7 +54,7 @@ class IntellifireFlameControlEntity(IntellifireEntity, NumberEntity): coordinator: IntellifireDataUpdateCoordinator, description: NumberEntityDescription, ) -> None: - """Initilaize Flame height Sensor.""" + """Initialize Flame height Sensor.""" super().__init__(coordinator, description) @property diff --git a/homeassistant/components/intellifire/sensor.py b/homeassistant/components/intellifire/sensor.py index e888ea1bbcf..bc42b977f12 100644 --- a/homeassistant/components/intellifire/sensor.py +++ b/homeassistant/components/intellifire/sensor.py @@ -56,15 +56,14 @@ def _downtime_to_timestamp(data: IntellifirePollData) -> datetime | None: INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = ( IntellifireSensorEntityDescription( key="flame_height", + translation_key="flame_height", icon="mdi:fire-circle", - name="Flame height", state_class=SensorStateClass.MEASUREMENT, # UI uses 1-5 for flame height, backing lib uses 0-4 value_fn=lambda data: (data.flameheight + 1), ), IntellifireSensorEntityDescription( key="temperature", - name="Temperature", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, @@ -72,7 +71,7 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = ( ), IntellifireSensorEntityDescription( key="target_temp", - name="Target temperature", + translation_key="target_temp", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, @@ -80,50 +79,50 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = ( ), IntellifireSensorEntityDescription( key="fan_speed", + translation_key="fan_speed", icon="mdi:fan", - name="Fan Speed", state_class=SensorStateClass.MEASUREMENT, value_fn=lambda data: data.fanspeed, ), IntellifireSensorEntityDescription( key="timer_end_timestamp", + translation_key="timer_end_timestamp", icon="mdi:timer-sand", - name="Timer End", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TIMESTAMP, value_fn=_time_remaining_to_timestamp, ), IntellifireSensorEntityDescription( key="downtime", - name="Downtime", + translation_key="downtime", entity_category=EntityCategory.DIAGNOSTIC, device_class=SensorDeviceClass.TIMESTAMP, value_fn=_downtime_to_timestamp, ), IntellifireSensorEntityDescription( key="uptime", - name="Uptime", + translation_key="uptime", entity_category=EntityCategory.DIAGNOSTIC, device_class=SensorDeviceClass.TIMESTAMP, value_fn=lambda data: utcnow() - timedelta(seconds=data.uptime), ), IntellifireSensorEntityDescription( key="connection_quality", - name="Connection Quality", + translation_key="connection_quality", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.connection_quality, entity_registry_enabled_default=False, ), IntellifireSensorEntityDescription( key="ecm_latency", - name="ECM latency", + translation_key="ecm_latency", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.ecm_latency, entity_registry_enabled_default=False, ), IntellifireSensorEntityDescription( key="ipv4_address", - name="IP", + translation_key="ipv4_address", entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.ipv4_address, ), diff --git a/homeassistant/components/intellifire/strings.json b/homeassistant/components/intellifire/strings.json index a8c8d76a601..6393a4e070d 100644 --- a/homeassistant/components/intellifire/strings.json +++ b/homeassistant/components/intellifire/strings.json @@ -35,5 +35,106 @@ "reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]", "not_intellifire_device": "Not an IntelliFire Device." } + }, + "entity": { + "binary_sensor": { + "flame": { + "name": "Flame" + }, + "timer_on": { + "name": "Timer on" + }, + "pilot_light_on": { + "name": "Pilot light on" + }, + "thermostat_on": { + "name": "Thermostat on" + }, + "pilot_flame_error": { + "name": "Pilot flame error" + }, + "flame_error": { + "name": "Flame Error" + }, + "fan_delay_error": { + "name": "Fan delay error" + }, + "maintenance_error": { + "name": "Maintenance error" + }, + "disabled_error": { + "name": "Disabled error" + }, + "fan_error": { + "name": "Fan error" + }, + "lights_error": { + "name": "Lights error" + }, + "accessory_error": { + "name": "Accessory error" + }, + "soft_lock_out_error": { + "name": "Soft lock out error" + }, + "ecm_offline_error": { + "name": "ECM offline error" + }, + "offline_error": { + "name": "Offline error" + } + }, + "fan": { + "fan": { + "name": "[%key:component::fan::title%]" + } + }, + "light": { + "lights": { + "name": "Lights" + } + }, + "number": { + "flame_control": { + "name": "Flame control" + } + }, + "sensor": { + "flame_height": { + "name": "Flame height" + }, + "target_temp": { + "name": "Target temperature" + }, + "fan_speed": { + "name": "Fan Speed" + }, + "timer_end_timestamp": { + "name": "Timer end" + }, + "downtime": { + "name": "Downtime" + }, + "uptime": { + "name": "Uptime" + }, + "connection_quality": { + "name": "Connection quality" + }, + "ecm_latency": { + "name": "ECM latency" + }, + "ipv4_address": { + "name": "IP address" + } + }, + "switch": { + "flame": { + "name": "Flame" + }, + "pilot_light": { + "name": "Pilot light" + } + } } } diff --git a/homeassistant/components/intellifire/switch.py b/homeassistant/components/intellifire/switch.py index 98abaa38849..1af4d8c0e91 100644 --- a/homeassistant/components/intellifire/switch.py +++ b/homeassistant/components/intellifire/switch.py @@ -37,14 +37,14 @@ class IntellifireSwitchEntityDescription( INTELLIFIRE_SWITCHES: tuple[IntellifireSwitchEntityDescription, ...] = ( IntellifireSwitchEntityDescription( key="on_off", - name="Flame", + translation_key="flame", on_fn=lambda control_api: control_api.flame_on(), off_fn=lambda control_api: control_api.flame_off(), value_fn=lambda data: data.is_on, ), IntellifireSwitchEntityDescription( key="pilot", - name="Pilot light", + 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(),