Updating Intellifire Naming scheme (#88666)
parent
9736fe1f99
commit
415190683f
|
@ -44,25 +44,25 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="timer_on",
|
||||
name="Timer On",
|
||||
name="Timer on",
|
||||
icon="mdi:camera-timer",
|
||||
value_fn=lambda data: data.timer_on,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="pilot_light_on",
|
||||
name="Pilot Light On",
|
||||
name="Pilot light on",
|
||||
icon="mdi:fire-alert",
|
||||
value_fn=lambda data: data.pilot_on,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="thermostat_on",
|
||||
name="Thermostat On",
|
||||
name="Thermostat on",
|
||||
icon="mdi:home-thermometer-outline",
|
||||
value_fn=lambda data: data.thermostat_on,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="error_pilot_flame",
|
||||
name="Pilot Flame Error",
|
||||
name="Pilot flame error",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.error_pilot_flame,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
|
@ -76,7 +76,7 @@ INTELLIFIRE_BINARY_SENSORS: tuple[IntellifireBinarySensorEntityDescription, ...]
|
|||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="error_fan_delay",
|
||||
name="Fan Delay Error",
|
||||
name="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",
|
||||
name="Maintenance error",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.error_maintenance,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="error_disabled",
|
||||
name="Disabled Error",
|
||||
name="Disabled error",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.error_disabled,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="error_fan",
|
||||
name="Fan Error",
|
||||
name="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",
|
||||
name="Lights error",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.error_lights,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
),
|
||||
IntellifireBinarySensorEntityDescription(
|
||||
key="error_accessory",
|
||||
name="Accessory Error",
|
||||
name="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",
|
||||
name="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",
|
||||
name="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",
|
||||
name="Offline error",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.error_offline,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
|
|
|
@ -67,7 +67,7 @@ class IntellifireDataUpdateCoordinator(DataUpdateCoordinator[IntellifirePollData
|
|||
return DeviceInfo(
|
||||
manufacturer="Hearth and Home",
|
||||
model="IFT-WFM",
|
||||
name="IntelliFire Fireplace",
|
||||
name="IntelliFire",
|
||||
identifiers={("IntelliFire", f"{self.read_api.data.serial}]")},
|
||||
sw_version=self.read_api.data.fw_ver_str,
|
||||
configuration_url=f"http://{self._api.fireplace_ip}/poll",
|
||||
|
|
|
@ -21,7 +21,8 @@ class IntellifireEntity(CoordinatorEntity[IntellifireDataUpdateCoordinator]):
|
|||
super().__init__(coordinator=coordinator)
|
||||
self.entity_description = description
|
||||
# Set the Display name the User will see
|
||||
self._attr_name = f"Fireplace {description.name}"
|
||||
self._attr_name = description.name
|
||||
self._attr_unique_id = f"{description.key}_{coordinator.read_api.data.serial}"
|
||||
self._attr_has_entity_name = True
|
||||
# Configure the Device Info
|
||||
self._attr_device_info = self.coordinator.device_info
|
||||
|
|
|
@ -46,7 +46,6 @@ INTELLIFIRE_FANS: tuple[IntellifireFanEntityDescription, ...] = (
|
|||
IntellifireFanEntityDescription(
|
||||
key="fan",
|
||||
name="Fan",
|
||||
has_entity_name=True,
|
||||
set_fn=lambda control_api, speed: control_api.set_fan_speed(speed=speed),
|
||||
value_fn=lambda data: data.fanspeed,
|
||||
speed_range=(1, 4),
|
||||
|
|
|
@ -17,7 +17,7 @@ from homeassistant.config_entries import ConfigEntry
|
|||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import DOMAIN
|
||||
from .const import DOMAIN, LOGGER
|
||||
from .coordinator import IntellifireDataUpdateCoordinator
|
||||
from .entity import IntellifireEntity
|
||||
|
||||
|
@ -41,7 +41,6 @@ INTELLIFIRE_LIGHTS: tuple[IntellifireLightEntityDescription, ...] = (
|
|||
IntellifireLightEntityDescription(
|
||||
key="lights",
|
||||
name="Lights",
|
||||
has_entity_name=True,
|
||||
set_fn=lambda control_api, level: control_api.set_lights(level=level),
|
||||
value_fn=lambda data: data.light_level,
|
||||
),
|
||||
|
@ -95,3 +94,4 @@ async def async_setup_entry(
|
|||
for description in INTELLIFIRE_LIGHTS
|
||||
)
|
||||
return
|
||||
LOGGER.debug("Disabling Lights - IntelliFire device does not appear to have one")
|
||||
|
|
|
@ -26,8 +26,8 @@ async def async_setup_entry(
|
|||
coordinator: IntellifireDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
description = NumberEntityDescription(
|
||||
key="flame_control",
|
||||
name="Flame control",
|
||||
key="flame_height",
|
||||
name="Flame height",
|
||||
icon="mdi:arrow-expand-vertical",
|
||||
)
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = (
|
|||
IntellifireSensorEntityDescription(
|
||||
key="flame_height",
|
||||
icon="mdi:fire-circle",
|
||||
name="Flame Height",
|
||||
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),
|
||||
|
@ -72,7 +72,7 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = (
|
|||
),
|
||||
IntellifireSensorEntityDescription(
|
||||
key="target_temp",
|
||||
name="Target Temperature",
|
||||
name="Target temperature",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
|
@ -116,7 +116,7 @@ INTELLIFIRE_SENSORS: tuple[IntellifireSensorEntityDescription, ...] = (
|
|||
),
|
||||
IntellifireSensorEntityDescription(
|
||||
key="ecm_latency",
|
||||
name="ECM Latency",
|
||||
name="ECM latency",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda data: data.ecm_latency,
|
||||
entity_registry_enabled_default=False,
|
||||
|
|
|
@ -44,7 +44,7 @@ INTELLIFIRE_SWITCHES: tuple[IntellifireSwitchEntityDescription, ...] = (
|
|||
),
|
||||
IntellifireSwitchEntityDescription(
|
||||
key="pilot",
|
||||
name="Pilot Light",
|
||||
name="Pilot light",
|
||||
icon="mdi:fire-alert",
|
||||
on_fn=lambda control_api: control_api.pilot_on(),
|
||||
off_fn=lambda control_api: control_api.pilot_off(),
|
||||
|
|
Loading…
Reference in New Issue