diff --git a/.gitignore b/.gitignore index 72c26fc..0c6b930 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ README.md .DS_Store custom_components/ithodaalderop/__pycache__ +*.pyc diff --git a/README.md b/README.md index b8403f7..913476f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - [What can be configured via this Integration](#what-can-be-configured-via-this-integration) - [Not (yet) supported](#not-yet-supported) - [Use-case](#use-case) - - [Available sensors](#available-sensors) + - [Why don't I see all entities?](#why-dont-i-see-all-entities) - [Installation](#installation) - [Prerequisites](#prerequisites) - [Install via HACS (recommended)](#install-via-hacs-recommended) @@ -41,65 +41,22 @@ Full auto-discovery from the WiFi add-on to Home Assistant is the best experienc * CO2 concencration for supported remotes * WPU like Pump Percentage, Boiler Temp, From / To Source Temps, Operating Mode etc -It creates a device and commonly used sensors and uses a predefined MQTT state topic to distinct the devices. - -## Available sensors -| Device | Sensor | Attributes | -|---|---|---| -| **Autotemp** ||| -|| Empty battery || -|| Error | Code | -|| Mode | Code | -|| Room X power % (%) || -|| Room X power kW (kW) || -|| Room X setpoint || -|| Room X temp || -|| Status | Code | -| **CVE** ||| -|| Error || -|| Fan Setpoint (rpm) || -|| Fan Speed (rpm) || -|| Filter dirty || -|| Humidity || -|| Temperature || -|| Total Operating Time || -|| Ventilation setpoint (%) || -|| Last Command (disabled by default) || -|| Last Command Source (disabled by default) || -| **NONCVE (HRU)** ||| -|| Actual Mode | Code | -|| Air Quality (%) || -|| Airfilter counter | Last Maintenance | -||| Next Maintenance Estimate | -|| Balance (%) || -|| Bypass position || -|| Exhaust fan (RPM) || -|| Exhaust temp (°C) || -|| Global fault code | Description | -|| Highest received CO2 value (Ppm) (disabled by default) || -|| Highest received RH value (%RH) (disabled by default) | Error Description | -|| Remaining override timer (Sec) || -|| Supply fan (RPM) || -|| Supply temp (°C) || -|| Last Command (disabled by default) || -|| Last Command Source (disabled by default) || -| **WPU** ||| -|| Boiler pump (%) || -|| Boiler temp up (°C) || -|| CV pressure (Bar) || -|| Cv pump (%) || -|| CV return temp (°C) || -|| Error || -|| Flow sensor (lt_hr) || -|| Heat demand thermost. (%) || -|| Status || -|| Temp from source (°C) || -|| Temp to source (°C) || -|| Requested room temp (°C) || -|| Room temp (°C) || -|| Well pump (%) || - -Missing a sensor? Feel free to create an [issue](https://github.com/jasperslits/haithowifi/issues) +It creates a device and all available sensors and uses a predefined MQTT state topic to distinct the devices. + +## Why don't I see all entities? +Some sensor are disabled by default. Follow these instructions to enable an entity. + +Click `xx entities not shown` within the device or just navigate to the entity directly + +![image](https://github.com/user-attachments/assets/2a72a81d-7007-410e-af52-9ba43e88352c) + +Click the `cogwheel` icon + +![image](https://github.com/user-attachments/assets/3c7c89a8-b847-48b1-a7ae-d272da72c552) + +Click `enable` + +![image](https://github.com/user-attachments/assets/64f7b234-648d-4e25-adeb-996c0d6a7ef8) # Installation diff --git a/custom_components/ithodaalderop/binary_sensor.py b/custom_components/ithodaalderop/binary_sensor.py index 859ab63..a319199 100644 --- a/custom_components/ithodaalderop/binary_sensor.py +++ b/custom_components/ithodaalderop/binary_sensor.py @@ -24,12 +24,11 @@ MQTT_STATETOPIC, NONCVE_DEVICES, ) -from .definitions import ( - AUTOTEMPBINARYSENSORS, - HRUECO350BINARYSENSORS, - HRUECOBINARYSENSORS, - IthoBinarySensorEntityDescription, -) +from .definitions.base import IthoBinarySensorEntityDescription +from .definitions.cve import CVE_BINARY_SENSORS +from .definitions.hru350 import HRU_ECO_350_BINARY_SENSORS +from .definitions.hrueco import HRU_ECO_BINARY_SENSORS +from .definitions.wpu import WPU_BINARY_SENSORS async def async_setup_entry( @@ -44,21 +43,28 @@ async def async_setup_entry( return sensors = [] - if config_entry.data[CONF_ADDON_TYPE] == "autotemp": - for description in AUTOTEMPBINARYSENSORS: - description.key = ( - f"{MQTT_BASETOPIC["autotemp"]}/{MQTT_STATETOPIC["autotemp"]}" - ) + if config_entry.data[CONF_ADDON_TYPE] == "cve": + for description in CVE_BINARY_SENSORS: + description.topic = f"{MQTT_BASETOPIC["cve"]}/{MQTT_STATETOPIC["cve"]}" sensors.append(IthoBinarySensor(description, config_entry)) - if config_entry.data[CONF_ADDON_TYPE] == "noncve": + if config_entry.data[CONF_ADDON_TYPE] == "noncve" and config_entry.data[ + CONF_NONCVE_MODEL + ] in ["hru_eco", "hru_eco_350"]: if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco": - hru_sensors = HRUECOBINARYSENSORS + hru_sensors = HRU_ECO_BINARY_SENSORS if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco_350": - hru_sensors = HRUECO350BINARYSENSORS + hru_sensors = HRU_ECO_350_BINARY_SENSORS for description in hru_sensors: - description.key = f"{MQTT_BASETOPIC["noncve"]}/{MQTT_STATETOPIC["noncve"]}" + description.topic = ( + f"{MQTT_BASETOPIC["noncve"]}/{MQTT_STATETOPIC["noncve"]}" + ) + sensors.append(IthoBinarySensor(description, config_entry)) + + if config_entry.data[CONF_ADDON_TYPE] == "wpu": + for description in WPU_BINARY_SENSORS: + description.topic = f"{MQTT_BASETOPIC["wpu"]}/{MQTT_STATETOPIC["wpu"]}" sensors.append(IthoBinarySensor(description, config_entry)) async_add_entities(sensors) @@ -77,19 +83,22 @@ def __init__( ) -> None: """Initialize the binary sensor.""" self.entity_description = description + self.entity_description.translation_key = self.entity_description.key model = ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]] if config_entry.data[CONF_ADDON_TYPE] == "noncve": - model = model + " - " + NONCVE_DEVICES[config_entry.data[CONF_NONCVE_MODEL]] + model = f"{model} - {NONCVE_DEVICES[config_entry.data[CONF_NONCVE_MODEL]]}" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, config_entry.data[CONF_ADDON_TYPE])}, manufacturer=MANUFACTURER, model=model, - name="Itho Daalderop " + ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]], + name=f"Itho Daalderop {ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}", ) - self._attr_unique_id = f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.translation_key}" + self._attr_unique_id = ( + f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.key}" + ) self.entity_id = f"binary_sensor.{self._attr_unique_id}" @property @@ -123,5 +132,5 @@ def message_received(message): self.async_write_ha_state() await mqtt.async_subscribe( - self.hass, self.entity_description.key, message_received, 1 + self.hass, self.entity_description.topic, message_received, 1 ) diff --git a/custom_components/ithodaalderop/config_flow.py b/custom_components/ithodaalderop/config_flow.py index 47c5a44..34efbb4 100644 --- a/custom_components/ithodaalderop/config_flow.py +++ b/custom_components/ithodaalderop/config_flow.py @@ -66,8 +66,7 @@ async def async_step_user(self, user_input: Mapping[str, Any] | None = None): ) self._abort_if_unique_id_configured() return self.async_create_entry( - title="Itho WiFi Add-on for " - + ADDON_TYPES[self.config[CONF_ADDON_TYPE]], + title=f"Itho WiFi Add-on for {ADDON_TYPES[self.config[CONF_ADDON_TYPE]]}", data=user_input, ) @@ -97,8 +96,7 @@ async def async_step_rooms(self, user_input: Mapping[str, Any] | None = None): ) self._abort_if_unique_id_configured() return self.async_create_entry( - title="Itho WiFi Add-on for " - + ADDON_TYPES[self.config[CONF_ADDON_TYPE]], + title=f"Itho WiFi Add-on for {ADDON_TYPES[self.config[CONF_ADDON_TYPE]]}", data=self.config, ) diff --git a/custom_components/ithodaalderop/const.py b/custom_components/ithodaalderop/const.py index c3a9d38..e96368e 100644 --- a/custom_components/ithodaalderop/const.py +++ b/custom_components/ithodaalderop/const.py @@ -90,7 +90,7 @@ 5: "Manual operation", } -HRUECO250300_ERROR_CODE = { +HRU_ECO_250_300_ERROR_CODE = { 0: "No error", 1: "W01 - Clean Filter", 2: "W02 - Replace Filter", @@ -103,7 +103,7 @@ 101: "E01 - Fan is't working", } -HRUECO350_ACTUAL_MODE = { +HRU_ECO_350_ACTUAL_MODE = { 1: "Low", 2: "Medium", 3: "High", @@ -114,13 +114,13 @@ # Based on user-experience. No codelist availble in the Itho Servicetool # For any additions/feedback, please create an issue in the repo of the integration -HRUECO350_GLOBAL_FAULT_CODE = { +HRU_ECO_350_GLOBAL_FAULT_CODE = { 0: "No error", 7: "Filters dirty", 11: "(External) Sensor error", } -HRUECO350_RH_ERROR_CODE = { +HRU_ECO_350_RH_ERROR_CODE = { 239: "Not Available", 240: "Shorted Sensor", 241: "Open Sensor", @@ -140,7 +140,7 @@ 255: "Unknown Error", } -HRUECO_STATUS = { +HRU_ECO_STATUS = { 0: "Normal", 1: "Adjust frost valve", 2: "Decelerate Supply fan", diff --git a/custom_components/ithodaalderop/definitions.py b/custom_components/ithodaalderop/definitions.py deleted file mode 100644 index 9ffc98d..0000000 --- a/custom_components/ithodaalderop/definitions.py +++ /dev/null @@ -1,698 +0,0 @@ -"""Definitions for Itho sensors added to MQTT. - -A sensor entity represents passive, read-only data provided by a device. It reflects the current state or measurement of something in the environment without directly interacting with or changing the device. -A control entity represents interactive elements that allow the user to send commands or configure a device to change its state or behavior. -A diagnostic entity provides device-specific metadata or operational insights that assist in understanding the device's internal state or functioning but is not directly related to the user's environment. -""" - -from __future__ import annotations - -from collections.abc import Callable -from dataclasses import dataclass - -from homeassistant.components.binary_sensor import ( - BinarySensorDeviceClass, - BinarySensorEntityDescription, -) -from homeassistant.components.sensor import ( - SensorDeviceClass, - SensorEntityDescription, - SensorStateClass, -) -from homeassistant.const import ( - CONCENTRATION_PARTS_PER_MILLION, - PERCENTAGE, - REVOLUTIONS_PER_MINUTE, - EntityCategory, - UnitOfElectricCurrent, - UnitOfPower, - UnitOfPressure, - UnitOfTemperature, - UnitOfTime, - UnitOfVolumeFlowRate, -) - - -@dataclass(frozen=False) -class IthoSensorEntityDescription(SensorEntityDescription): - """Sensor entity description for Itho.""" - - state: Callable | None = None - json_field: str | None = None - key: str | None = None - icon: str | None = None - affix: str | None = None - entity_category: EntityCategory | None = None - - -@dataclass(frozen=False) -class IthoBinarySensorEntityDescription(BinarySensorEntityDescription): - """Binary Sensor entity description for Itho.""" - - state: Callable | None = None - json_field: str | None = None - key: str | None = None - icon: str | None = None - icon_off: str | None = None - icon_on: str | None = None - affix: str | None = None - entity_category: EntityCategory | None = None - - -AUTOTEMPBINARYSENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( - IthoBinarySensorEntityDescription( - json_field="Empty battery ( 0=OK )", - translation_key="empty_battery", - device_class=BinarySensorDeviceClass.BATTERY, - entity_category=EntityCategory.DIAGNOSTIC, - # icon_off="mdi:battery", - # icon_on="mdi:battery-low", - ), -) - -AUTOTEMPSENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Error", - translation_key="error", - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Mode", - translation_key="mode", - ), - IthoSensorEntityDescription( - json_field="State off", - translation_key="state", - ), -) - -AUTOTEMPROOMSENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Room X power % (%)", - translation_key="power_perc", - device_class=SensorDeviceClass.POWER_FACTOR, - native_unit_of_measurement="%", - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Room X power kW (kW)", - translation_key="power_kw", - device_class=SensorDeviceClass.POWER, - native_unit_of_measurement=UnitOfPower.KILO_WATT, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Room X setp", - translation_key="setpoint_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Room X temp", - translation_key="actual_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), -) - -CVEBINARYSENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( - IthoBinarySensorEntityDescription( - json_field="Filter dirty", - translation_key="filter_dirty", - device_class=BinarySensorDeviceClass.PROBLEM, - entity_category=EntityCategory.DIAGNOSTIC, - icon_off="mdi:air-filter", - icon_on="mdi:vacuum-outline", - ), -) - -CVESENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Error", - translation_key="error", - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Fan setpoint (rpm)", - translation_key="fan_setpoint_rpm", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Fan speed (rpm)", - translation_key="fan_speed", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - ), - IthoSensorEntityDescription( - json_field="Highest CO2 concentration (ppm)", - translation_key="highest_received_co2_value", - native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - icon="mdi:molecule-co2", - ), - IthoSensorEntityDescription( - json_field="Highest RH concentration (%)", - translation_key="highest_received_rh_value", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - ), - IthoSensorEntityDescription( - json_field="hum", - translation_key="humidity", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="temp", - translation_key="temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Total operation (hours)", - translation_key="total_operation_time", - native_unit_of_measurement=UnitOfTime.HOURS, - state_class=SensorStateClass.TOTAL_INCREASING, - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Ventilation setpoint (%)", - translation_key="ventilation_setpoint_percentage", - native_unit_of_measurement=PERCENTAGE, - ), -) - -LASTCMDSENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="command", - translation_key="last_cmd_command", - entity_category=EntityCategory.DIAGNOSTIC, - icon="mdi:cog", - entity_registry_enabled_default=False, - ), - IthoSensorEntityDescription( - json_field="source", - translation_key="last_cmd_source", - entity_category=EntityCategory.DIAGNOSTIC, - icon="mdi:target", - entity_registry_enabled_default=False, - ), -) - -HRUECO200SENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Actual speed (rpm)", - translation_key="actual_speed", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Air discharge temperature (°C)", - translation_key="air_discharge_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Average air outlet temperature (°C)", - translation_key="average_air_outlet_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Error", - translation_key="error", - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Filter use counter (hour)", - translation_key="filter_use_counter", - native_unit_of_measurement=UnitOfTime.HOURS, - state_class=SensorStateClass.TOTAL_INCREASING, - entity_category=EntityCategory.DIAGNOSTIC, - icon="mdi:counter", - ), - IthoSensorEntityDescription( - json_field="Max. CO2 level (ppm)", - translation_key="max_co2_level", - native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - icon="mdi:molecule-co2", - ), - IthoSensorEntityDescription( - json_field="Max. RH level (%)", - translation_key="max_rh_level", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - ), - IthoSensorEntityDescription( - json_field="Room temp setpoint (°C)", - translation_key="room_temp_setpoint", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Outside temperature (°C)", - translation_key="outside_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Speed setpoint (rpm)", - translation_key="speed_setpoint", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - ), - IthoSensorEntityDescription( - json_field="Total operation (hrs)", - translation_key="total_operation_time", - native_unit_of_measurement=UnitOfTime.HOURS, - state_class=SensorStateClass.TOTAL_INCREASING, - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Ventilation setpoint (%)", - translation_key="ventilation_setpoint_percentage", - native_unit_of_measurement=PERCENTAGE, - ), -) - -HRUECO250300SENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Absolute speed of the fan (%)", - translation_key="absolute_fanspeed", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Current consumption of fan (mA)", - translation_key="current_consumption_fan", - device_class=SensorDeviceClass.CURRENT, - native_unit_of_measurement=UnitOfElectricCurrent.MILLIAMPERE, - state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Desired capacity (m3/h)", - translation_key="desired_capacity", - device_class=SensorDeviceClass.VOLUME_FLOW_RATE, - native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Desired current consumption of fan (mA)", - translation_key="desired_consumption_fan", - device_class=SensorDeviceClass.CURRENT, - native_unit_of_measurement=UnitOfElectricCurrent.MILLIAMPERE, - state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Error number", - translation_key="error_number", - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Highest measured CO2 (ppm)", - translation_key="highest_measured_co2_value", - native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - icon="mdi:molecule-co2", - ), - IthoSensorEntityDescription( - json_field="Highest measured RH (%)", - translation_key="highest_measured_rh_value", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - ), - IthoSensorEntityDescription( - json_field="Inlet temperature (°C)", - translation_key="inlet_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Measured blend temperature heated NTC (°C)", - translation_key="measured_blend_temp_heated", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Measured outside temperature (°C)", - translation_key="outside_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Measured temperature of mixed outside air (°C)", - translation_key="mixed_outside_air_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Measured waste temperature heated NTC (°C)", - translation_key="measured_waste_temp_heated", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Percentage that the bypass valve is open (%)", - translation_key="bypass_valve_open", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Relative fanspeed (%)", - translation_key="relative_fanspeed", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="RPM of the motor (rpm)", - translation_key="motor_speed", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Status", - translation_key="status", - ), - IthoSensorEntityDescription( - json_field="Temperature of the blown out air of the house (°C)", - translation_key="blown_out_air_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Temperature of the extracted air (°C)", - translation_key="extracted_air_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="The desired inlet temperature (°C)", - translation_key="desired_inlet_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="The flow of the blown air (m3/h)", - translation_key="flow_blown_air", - device_class=SensorDeviceClass.VOLUME_FLOW_RATE, - native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="The flow of the inflated air (M3/h)", - translation_key="flow_inflated_air", - device_class=SensorDeviceClass.VOLUME_FLOW_RATE, - native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, - state_class=SensorStateClass.MEASUREMENT, - ), - # No native_unit_of_measurement available for mass flow - IthoSensorEntityDescription( - json_field="The mass flow of the air entering the house (kg/h)", - translation_key="mass_flow_air_enter_house_kgh", - state_class=SensorStateClass.MEASUREMENT, - ), - # No native_unit_of_measurement available for mass flow - IthoSensorEntityDescription( - json_field="The mass flow of the air leaving the house (kg/h)", - translation_key="mass_flow_air_leaving_house_kgh", - state_class=SensorStateClass.MEASUREMENT, - ), -) - -HRUECO350BINARYSENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( - IthoBinarySensorEntityDescription( - json_field="Bypass position", - translation_key="bypass_position", - device_class=BinarySensorDeviceClass.OPENING, - entity_category=EntityCategory.DIAGNOSTIC, - icon_off="mdi:valve-closed", - icon_on="mdi:valve-open", - ), -) - -HRUECO350SENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Actual Mode", - translation_key="actual_mode", - icon="mdi:knob", - ), - IthoSensorEntityDescription( - json_field="Airfilter counter", - translation_key="airfilter_counter", - native_unit_of_measurement=UnitOfTime.HOURS, - state_class=SensorStateClass.TOTAL_INCREASING, - entity_category=EntityCategory.DIAGNOSTIC, - icon="mdi:counter", - ), - IthoSensorEntityDescription( - json_field="Air Quality (%)", - translation_key="airquality", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Balance (%)", - translation_key="balance", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Exhaust fan (RPM)", - translation_key="actual_exhaust_fan", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Exhaust temp (°C)", - translation_key="actual_exhaust_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Global fault code", - translation_key="global_fault_code", - icon="mdi:alert-circle-outline", - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Highest received CO2 value (Ppm)", - translation_key="highest_received_co2_value", - native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - icon="mdi:molecule-co2", - ), - IthoSensorEntityDescription( - json_field="Highest received RH value (%RH)", - translation_key="highest_received_rh_value", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - entity_registry_enabled_default=False, - ), - IthoSensorEntityDescription( - json_field="Remaining override timer (Sec)", - translation_key="remaining_override_timer", - native_unit_of_measurement=UnitOfTime.SECONDS, - state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, - icon="mdi:timer-outline", - ), - IthoSensorEntityDescription( - json_field="Supply fan (RPM)", - translation_key="actual_supply_fan", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Supply temp (°C)", - translation_key="actual_supply_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), -) - -HRUECOBINARYSENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( - IthoBinarySensorEntityDescription( - json_field="Bypass position (pulse)", - translation_key="bypass_position", - device_class=BinarySensorDeviceClass.OPENING, - entity_category=EntityCategory.DIAGNOSTIC, - icon_off="mdi:valve-closed", - icon_on="mdi:valve-open", - ), -) - -HRUECOSENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Air filter counter", - translation_key="airfilter_counter", - native_unit_of_measurement=UnitOfTime.HOURS, - state_class=SensorStateClass.TOTAL_INCREASING, - entity_category=EntityCategory.DIAGNOSTIC, - icon="mdi:counter", - ), - IthoSensorEntityDescription( - json_field="Drain fan speed (rpm)", - translation_key="drain_fan_speed", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Temp of exhaust air (°C)", - translation_key="actual_exhaust_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="room temp (°C)", - translation_key="room_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Status", - translation_key="status", - ), - IthoSensorEntityDescription( - json_field="Supply fan speed (rpm)", - translation_key="supply_fan_speed", - native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Temp of supply air (°C)", - translation_key="actual_supply_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), -) - -WPUSENSORS: tuple[IthoSensorEntityDescription, ...] = ( - IthoSensorEntityDescription( - json_field="Boiler pump (%)", - translation_key="boiler_pump_percent", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Boiler temp up (°C)", - translation_key="boiler_temp_up", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="CV pressure (Bar)", - translation_key="cv_pressure", - device_class=SensorDeviceClass.PRESSURE, - native_unit_of_measurement=UnitOfPressure.BAR, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Cv pump (%)", - translation_key="cv_pump_percent", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="CV return temp (°C)", - translation_key="cv_return_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Error", - translation_key="error", - entity_category=EntityCategory.DIAGNOSTIC, - ), - IthoSensorEntityDescription( - json_field="Flow sensor (lt_hr)", - translation_key="flow_sensor", - state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, - icon="mdi:waves-arrow-right", - ), - IthoSensorEntityDescription( - json_field="Heat demand thermost. (%)", - translation_key="heat_demand", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Requested room temp (°C)", - translation_key="requested_room_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Room temp (°C)", - translation_key="room_temp", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Status", - translation_key="status", - ), - IthoSensorEntityDescription( - json_field="ECO selected on thermostat", - translation_key="thermostat", - ), - IthoSensorEntityDescription( - json_field="Temp to source (°C)", - translation_key="temp_to_source", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Temp from source (°C)", - translation_key="temp_from_source", - device_class=SensorDeviceClass.TEMPERATURE, - native_unit_of_measurement=UnitOfTemperature.CELSIUS, - state_class=SensorStateClass.MEASUREMENT, - ), - IthoSensorEntityDescription( - json_field="Well pump (%)", - translation_key="well_pump_percent", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - ), -) diff --git a/custom_components/ithodaalderop/definitions/__init__.py b/custom_components/ithodaalderop/definitions/__init__.py new file mode 100644 index 0000000..8fc0a51 --- /dev/null +++ b/custom_components/ithodaalderop/definitions/__init__.py @@ -0,0 +1 @@ +"""Init package.""" diff --git a/custom_components/ithodaalderop/definitions/autotemp.py b/custom_components/ithodaalderop/definitions/autotemp.py new file mode 100644 index 0000000..ce552fc --- /dev/null +++ b/custom_components/ithodaalderop/definitions/autotemp.py @@ -0,0 +1,239 @@ +"""Definitions for Itho Autotemp sensors added to MQTT.""" + +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import ( + PERCENTAGE, + EntityCategory, + UnitOfPower, + UnitOfTemperature, + UnitOfTime, +) + +from .base import IthoSensorEntityDescription + +AUTOTEMP_COMM_SPACE_SENSOR_TEMPLATE = IthoSensorEntityDescription( + json_field="Comm space X (sec)", + key="comm_space", + unique_id_template="comm_space_x", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, +) + +AUTOTEMP_DISTRIBUTOR_VALVE_SENSOR_TEMPLATE = IthoSensorEntityDescription( + json_field="Distributor X valve Y", + key="distributor_valve", + unique_id_template="distributor_x_valve_y", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, +) + +AUTOTEMP_MALFUNCTION_VALVE_DECTECTION_DIST_SENSOR_TEMPLATE = ( + IthoSensorEntityDescription( + json_field="Malfunction valve detection dist X", + key="malfunction_valve_detection_dist", + unique_id_template="malfunction_valve_detection_dist_x", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ) +) + +AUTOTEMP_ROOM_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="Room X power % (%)", + key="power_perc", + device_class=SensorDeviceClass.POWER_FACTOR, + native_unit_of_measurement="%", + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Room X power kW (kW)", + key="power_kw", + device_class=SensorDeviceClass.POWER, + native_unit_of_measurement=UnitOfPower.KILO_WATT, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Room X setp", + key="setpoint_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Room X temp", + key="actual_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), +) + +AUTOTEMP_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="Condition", + key="condition", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Condition cool", + key="condition_cool", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Condition off", + key="condition_off", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Cycle counter (sec)", + key="cycle_counter", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Desired power (%)", + key="desired_power", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Error", + key="error", + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Heat source", + key="heat_source", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="LED_Fast", + key="led_fast", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="LED_On", + key="led_on", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="LED_Slow", + key="led_slow", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Mode", + key="mode", + ), + IthoSensorEntityDescription( + json_field="Outdoor temp (°C)", + key="outdoor_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Particulars", + key="particulars", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Rest cycle time (sec)", + key="rest_cycle_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Rest vent time (sec)", + key="rest_vent_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Rest vent time (sec)", + key="rest_vent_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="State cool", + key="state_cool", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="State hand", + key="state_hand", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="state hand", + key="state_hand2", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="State heating", + key="state_heating", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="State off", + key="state", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Time active zone too cold (sec)", + key="time_active_zone_too_cold", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Valve failure detection distributor 1", + key="valve_failure_detection_distributor_1", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), +) + +AUTOTEMP_VALVE_SENSOR_TEMPLATE: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="VX_valve", + key="v_valve", + unique_id_template="vx_valve", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Valve failure distributor X", + key="valve_failure_distributor", + unique_id_template="valve_failure_distributor_x", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), +) diff --git a/custom_components/ithodaalderop/definitions/base.py b/custom_components/ithodaalderop/definitions/base.py new file mode 100644 index 0000000..fa5e1b1 --- /dev/null +++ b/custom_components/ithodaalderop/definitions/base.py @@ -0,0 +1,45 @@ +"""Definitions for Itho sensors added to MQTT. + +A sensor entity represents passive, read-only data provided by a device. It reflects the current state or measurement of something in the environment without directly interacting with or changing the device. +A control entity represents interactive elements that allow the user to send commands or configure a device to change its state or behavior. +A diagnostic entity provides device-specific metadata or operational insights that assist in understanding the device's internal state or functioning but is not directly related to the user's environment. +""" + +from __future__ import annotations + +from collections.abc import Callable +from dataclasses import dataclass + +from homeassistant.components.binary_sensor import BinarySensorEntityDescription +from homeassistant.components.sensor import SensorEntityDescription +from homeassistant.const import EntityCategory + + +@dataclass(frozen=False) +class IthoBinarySensorEntityDescription(BinarySensorEntityDescription): + """Binary Sensor entity description for Itho.""" + + key: str | None = None + state: Callable | None = None + json_field: str | None = None + topic: str | None = None + icon: str | None = None + icon_off: str | None = None + icon_on: str | None = None + unique_id_template: str | None = None + unique_id: str | None = None + entity_category: EntityCategory | None = None + + +@dataclass(frozen=False) +class IthoSensorEntityDescription(SensorEntityDescription): + """Sensor entity description for Itho.""" + + key: str | None = None + state: Callable | None = None + json_field: str | None = None + topic: str | None = None + icon: str | None = None + unique_id_template: str | None = None + unique_id: str | None = None + entity_category: EntityCategory | None = None diff --git a/custom_components/ithodaalderop/definitions/co2_remote.py b/custom_components/ithodaalderop/definitions/co2_remote.py new file mode 100644 index 0000000..55f7b29 --- /dev/null +++ b/custom_components/ithodaalderop/definitions/co2_remote.py @@ -0,0 +1,13 @@ +"""Definitions for Itho CO2 Remote sensors added to MQTT.""" + +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import CONCENTRATION_PARTS_PER_MILLION + +from .base import IthoSensorEntityDescription + +REMOTE_SENSOR_TEMPLATE = IthoSensorEntityDescription( + key="remote", + device_class=SensorDeviceClass.CO2, + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + state_class=SensorStateClass.MEASUREMENT, +) diff --git a/custom_components/ithodaalderop/definitions/cve.py b/custom_components/ithodaalderop/definitions/cve.py new file mode 100644 index 0000000..361978e --- /dev/null +++ b/custom_components/ithodaalderop/definitions/cve.py @@ -0,0 +1,315 @@ +"""Definitions for Itho CVE sensors added to MQTT.""" + +from homeassistant.components.binary_sensor import BinarySensorDeviceClass +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import ( + CONCENTRATION_PARTS_PER_MILLION, + PERCENTAGE, + REVOLUTIONS_PER_MINUTE, + EntityCategory, + UnitOfTemperature, + UnitOfTime, +) + +from .base import IthoBinarySensorEntityDescription, IthoSensorEntityDescription + +CVE_BINARY_SENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( + IthoBinarySensorEntityDescription( + json_field="Filter dirty", + key="filter_dirty", + device_class=BinarySensorDeviceClass.PROBLEM, + entity_category=EntityCategory.DIAGNOSTIC, + icon_off="mdi:air-filter", + icon_on="mdi:vacuum-outline", + ), +) + +CVE_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="Absence (min)", + key="absence", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CO2 value (ppm)", + key="co2_value", + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Co2 velocity", + key="co2_velocity", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CO2 ventilation (%)", + key="co2_ventilation", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Condition", + key="condition", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Counter min-time (s)", + key="counter_min_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Counter stop (s)", + key="counter_stop", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Current period", + key="current_period", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Cycle timer", + key="cycle_timer", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Deferred absence (min)", + key="deferred_absence", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Enhanced bathroom", + key="enhanced_bathroom", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Error", + key="error", + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Fan setpoint (rpm)", + key="fan_setpoint_rpm", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Fan speed (rpm)", + key="fan_speed", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Highest CO2 concentration (ppm)", + key="highest_received_co2_value", + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + icon="mdi:molecule-co2", + ), + IthoSensorEntityDescription( + json_field="Highest RH concentration (%)", + key="highest_received_rh_value", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="hum", + key="humidity", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Internal humidity (%)", + key="internal_humidity", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Internal temp (°C)", + key="internal_temp", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Measurement actual (%)", + key="measurement_actual", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Measurement previous first (%)", + key="measurement_previous_first", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Measurement previous second (%)", + key="measurement_previous_second", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="New level time", + key="new_level_time", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Next Rfspeed absolute", + key="next_rfspeed_absolute", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Next Rfspeed level", + key="next_rfspeed_level", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Period timer", + key="period_timer", + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Presence timer (sec)", + key="presence_timer", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="RelativeHumidity", + key="relative_humidity", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Rfspeed absolute", + key="rfspeed_absolute", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Sample timer", + key="sample_timer", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Selected mode", + key="selected_mode", + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Selection", + key="selection", + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Sensor fault", + key="sensor_fault", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Speed timer", + key="speed_timer", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Startup counter", + key="start_up_counter", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="temp", + key="temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Temperature", + key="temperature", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Total operation (hours)", + key="total_operation_time", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.TOTAL_INCREASING, + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Valve", + key="valve", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Ventilation level (%)", + key="ventilation_level", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Ventilation request (%)", + key="ventilation_request", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Ventilation setpoint (%)", + key="ventilation_setpoint_percentage", + native_unit_of_measurement=PERCENTAGE, + ), +) diff --git a/custom_components/ithodaalderop/definitions/hru200.py b/custom_components/ithodaalderop/definitions/hru200.py new file mode 100644 index 0000000..f5fc211 --- /dev/null +++ b/custom_components/ithodaalderop/definitions/hru200.py @@ -0,0 +1,218 @@ +"""Definitions for Itho HRU 200 sensors added to MQTT.""" + +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import ( + CONCENTRATION_PARTS_PER_MILLION, + PERCENTAGE, + REVOLUTIONS_PER_MINUTE, + EntityCategory, + UnitOfTemperature, + UnitOfTime, +) + +from .base import IthoSensorEntityDescription + +HRU_ECO_200_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="Absence (min)", + key="absence", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Actual speed (rpm)", + key="actual_speed", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Air discharge temperature (°C)", + key="air_discharge_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Average air outlet temperature (°C)", + key="average_air_outlet_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Block timer bypass (min)", + key="block_timer_bypass", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Bypass mode", + key="bypass_mode", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Bypass setpoint (%)", + key="bypass_setpoint", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Current bypass share (%)", + key="current_bypass_share", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Deferred absence (min)", + key="deferred_absence", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Duration of current frost setpoint (sec)", + key="duration_of_current_frost_setpoint", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Error", + key="error", + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Fan off during frost (min)", + key="fan_off_during_frost", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Filter use counter (hour)", + key="filter_use_counter", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.TOTAL_INCREASING, + entity_category=EntityCategory.DIAGNOSTIC, + icon="mdi:counter", + ), + IthoSensorEntityDescription( + json_field="Frost adjustment speed (rpm)", + key="frost_adjustment_speed", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Frost status", + key="frost_status", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Max. CO2 level (ppm)", + key="max_co2_level", + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + icon="mdi:molecule-co2", + ), + IthoSensorEntityDescription( + json_field="Max frost vent. speed (rpm)", + key="max_frost_vent_speed", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Max. RH level (%)", + key="max_rh_level", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Number of bypass settings", + key="number_of_bypass_settings", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Periodic bypass valve travel (min)", + key="periodic_bypass_valve_travel", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Position of frost valve (%)", + key="position_of_frost_valve", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Room temp setpoint (°C)", + key="room_temp_setpoint", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Outside temperature (°C)", + key="outside_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Selection", + key="selection", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Speed setpoint (rpm)", + key="speed_setpoint", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Start-up counter", + key="start_up_counter", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Total operation (hrs)", + key="total_operation_time", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.TOTAL_INCREASING, + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Ventilation setpoint (%)", + key="ventilation_setpoint_percentage", + native_unit_of_measurement=PERCENTAGE, + ), +) diff --git a/custom_components/ithodaalderop/definitions/hru250_300.py b/custom_components/ithodaalderop/definitions/hru250_300.py new file mode 100644 index 0000000..d0ac51f --- /dev/null +++ b/custom_components/ithodaalderop/definitions/hru250_300.py @@ -0,0 +1,243 @@ +"""Definitions for Itho HRU 250 and HRU 300 sensors added to MQTT.""" + +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import ( + CONCENTRATION_PARTS_PER_MILLION, + PERCENTAGE, + REVOLUTIONS_PER_MINUTE, + EntityCategory, + UnitOfElectricCurrent, + UnitOfTemperature, + UnitOfTime, + UnitOfVolumeFlowRate, +) + +from .base import IthoSensorEntityDescription + +HRU_ECO_250_300_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="Absolute speed of the fan (%)", + key="absolute_fanspeed", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Busy doing adjustments (-)", + key="busy_doing_adjustments", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Current consumption of fan (mA)", + key="current_consumption_fan", + device_class=SensorDeviceClass.CURRENT, + native_unit_of_measurement=UnitOfElectricCurrent.MILLIAMPERE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Desired capacity (m3/h)", + key="desired_capacity", + device_class=SensorDeviceClass.VOLUME_FLOW_RATE, + native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Desired current consumption of fan (mA)", + key="desired_consumption_fan", + device_class=SensorDeviceClass.CURRENT, + native_unit_of_measurement=UnitOfElectricCurrent.MILLIAMPERE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Error number", + key="error_number", + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Highest measured CO2 (ppm)", + key="highest_measured_co2_value", + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + icon="mdi:molecule-co2", + ), + IthoSensorEntityDescription( + json_field="Highest measured RH (%)", + key="highest_measured_rh_value", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Hysteresis of the frost (K)", + key="hysteresis_of_the_frost", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Hysteresis use in control mode (K)", + key="hysteresis_use_in_control_mode", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Inlet temperature (°C)", + key="inlet_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Measured blend temperature heated NTC (°C)", + key="measured_blend_temp_heated", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + entity_category=EntityCategory.DIAGNOSTIC, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Measured outside temperature (°C)", + key="outside_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Measured temperature of mixed outside air (°C)", + key="mixed_outside_air_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Measured waste temperature heated NTC (°C)", + key="measured_waste_temp_heated", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Number of hours of too cold air (hour)", + key="number_of_hours_of_too_cold_air", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Number of steps the frost valve is open (steps)", + key="number_of_steps_the_frost_valve_is_open", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Percentage that the bypass valve is open (%)", + key="bypass_valve_open", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Relative fanspeed (%)", + key="relative_fanspeed", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="RPM of the motor (rpm)", + key="motor_speed", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Sample timer in frost mode (min)", + key="sample_timer_in_frost_mode", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Status", + key="status", + ), + IthoSensorEntityDescription( + json_field="Temperature of the blown out air of the house (°C)", + key="blown_out_air_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Temperature of the extracted air (°C)", + key="extracted_air_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Temporary speed reduction (rpm)", + key="temporary_speed_reduction", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="The desired inlet temperature (°C)", + key="desired_inlet_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="The flow of the blown air (m3/h)", + key="flow_blown_air", + device_class=SensorDeviceClass.VOLUME_FLOW_RATE, + native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="The flow of the inflated air (M3/h)", + key="flow_inflated_air", + device_class=SensorDeviceClass.VOLUME_FLOW_RATE, + native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="The mass flow of the air entering the house (kg/h)", + key="mass_flow_air_enter_house_kgh", + native_unit_of_measurement="kg/h", + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="The mass flow of the air leaving the house (kg/h)", + key="mass_flow_air_leaving_house_kgh", + native_unit_of_measurement="kg/h", + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Timer for how long the house is cooled (hour)", + key="timer_for_how_long_the_house_is_cooled", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Timer for how long the house is heated (hour)", + key="timer_for_how_long_the_house_is_heated", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), +) diff --git a/custom_components/ithodaalderop/definitions/hru350.py b/custom_components/ithodaalderop/definitions/hru350.py new file mode 100644 index 0000000..b142e93 --- /dev/null +++ b/custom_components/ithodaalderop/definitions/hru350.py @@ -0,0 +1,226 @@ +"""Definitions for Itho HRU 350 sensors added to MQTT.""" + +from homeassistant.components.binary_sensor import BinarySensorDeviceClass +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import ( + CONCENTRATION_PARTS_PER_MILLION, + PERCENTAGE, + REVOLUTIONS_PER_MINUTE, + EntityCategory, + UnitOfTemperature, + UnitOfTime, +) + +from .base import IthoBinarySensorEntityDescription, IthoSensorEntityDescription + +HRU_ECO_350_BINARY_SENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( + IthoBinarySensorEntityDescription( + json_field="Bypass position", + key="bypass_position", + device_class=BinarySensorDeviceClass.OPENING, + entity_category=EntityCategory.DIAGNOSTIC, + icon_off="mdi:valve-closed", + icon_on="mdi:valve-open", + ), + IthoBinarySensorEntityDescription( + json_field="Valve position", + key="valve_position", + device_class=BinarySensorDeviceClass.OPENING, + entity_category=EntityCategory.DIAGNOSTIC, + icon_off="mdi:valve-closed", + icon_on="mdi:valve-open", + entity_registry_enabled_default=False, + ), +) + +HRU_ECO_350_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="Actual Mode", + key="actual_mode", + icon="mdi:knob", + ), + IthoSensorEntityDescription( + json_field="Airfilter counter", + key="airfilter_counter", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.TOTAL_INCREASING, + entity_category=EntityCategory.DIAGNOSTIC, + icon="mdi:counter", + ), + IthoSensorEntityDescription( + json_field="Air Quality (%)", + key="airquality", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Balance (%)", + key="balance", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Boiler timer", + key="boiler_timer", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Current position", + key="current_position", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Exhaust fan (RPM)", + key="actual_exhaust_fan", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Exhaust fan actual (RPM)", + key="exhaust_fan_actual", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Exhaust temp (°C)", + key="actual_exhaust_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Fallback speed timer (Sec)", + key="fallback_speed_timer", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Frost block", + key="frost_block", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Frost timer", + key="frost_timer", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="GHEswitch", + key="ghe_switch", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Global fault code", + key="global_fault_code", + icon="mdi:alert-circle-outline", + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Highest received CO2 value (Ppm)", + key="highest_received_co2_value", + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + icon="mdi:molecule-co2", + ), + IthoSensorEntityDescription( + json_field="Highest received RH value (%RH)", + key="highest_received_rh_value", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Outdoor temp (°C)", + key="outdoor_temp", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Remaining override timer (Sec)", + key="remaining_override_timer", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + icon="mdi:timer-outline", + ), + IthoSensorEntityDescription( + json_field="Requested fanspeed (%)", + key="requested_fanspeed", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Pir fan speed level", + key="pir_fan_speed_level", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Room temp (°C)", + key="room_temp", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Status", + key="status", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Summercounter", + key="summer_counter", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Summerday (K_min)", + key="summerday_k_min", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Supply fan (RPM)", + key="actual_supply_fan", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Supply fan actual (RPM)", + key="supply_fan_actual", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Supply temp (°C)", + key="actual_supply_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="VKKswitch", + key="vkk_switch", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), +) diff --git a/custom_components/ithodaalderop/definitions/hrueco.py b/custom_components/ithodaalderop/definitions/hrueco.py new file mode 100644 index 0000000..95c5e2b --- /dev/null +++ b/custom_components/ithodaalderop/definitions/hrueco.py @@ -0,0 +1,187 @@ +"""Definitions for Itho HRU Eco sensors added to MQTT.""" + +from homeassistant.components.binary_sensor import BinarySensorDeviceClass +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import ( + PERCENTAGE, + REVOLUTIONS_PER_MINUTE, + EntityCategory, + UnitOfTemperature, + UnitOfTime, +) + +from .base import IthoBinarySensorEntityDescription, IthoSensorEntityDescription + +HRU_ECO_BINARY_SENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( + IthoBinarySensorEntityDescription( + json_field="Bypass position (pulse)", + key="bypass_position", + device_class=BinarySensorDeviceClass.OPENING, + entity_category=EntityCategory.DIAGNOSTIC, + icon_off="mdi:valve-closed", + icon_on="mdi:valve-open", + ), + IthoBinarySensorEntityDescription( + json_field="Valve position (pulse)", + key="valve_position", + device_class=BinarySensorDeviceClass.OPENING, + entity_category=EntityCategory.DIAGNOSTIC, + icon_off="mdi:valve-closed", + icon_on="mdi:valve-open", + entity_registry_enabled_default=False, + ), +) + +HRU_ECO_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="Air filter counter", + key="airfilter_counter", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.TOTAL_INCREASING, + entity_category=EntityCategory.DIAGNOSTIC, + icon="mdi:counter", + ), + IthoSensorEntityDescription( + json_field="Balance (%)", + key="balance", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="boiler timer (min)", + key="boiler_timer", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Current pos", + key="current_pos", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Drain actual (rpm)", + key="drain_actual", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Drain fan speed (rpm)", + key="drain_fan_speed", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Drain requested (rpm)", + key="drain_requested", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Frost lock", + key="frost_lock", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Frost timer (sec)", + key="frost_timer", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="GHE switch", + key="ghe_switch", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Outdoor temp (°C)", + key="outdoor_temp", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Temp of exhaust air (°C)", + key="actual_exhaust_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Requested speed (%)", + key="requested_speed", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="room temp (°C)", + key="room_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Status", + key="status", + ), + IthoSensorEntityDescription( + json_field="summer counter", + key="summer_counter", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Summer day", + key="summer_day", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Supply actual (rpm)", + key="supply_actual", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Supply fan speed (rpm)", + key="supply_fan_speed", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Supply requested (rpm)", + key="supply_requested", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Temp of supply air (°C)", + key="actual_supply_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="VKK switch", + key="vkk_switch", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), +) diff --git a/custom_components/ithodaalderop/definitions/last_command.py b/custom_components/ithodaalderop/definitions/last_command.py new file mode 100644 index 0000000..9c83b81 --- /dev/null +++ b/custom_components/ithodaalderop/definitions/last_command.py @@ -0,0 +1,22 @@ +"""Definitions for Itho Last Command sensors added to MQTT.""" + +from homeassistant.const import EntityCategory + +from .base import IthoSensorEntityDescription + +LAST_CMD_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="command", + key="last_cmd_command", + entity_category=EntityCategory.DIAGNOSTIC, + icon="mdi:cog", + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="source", + key="last_cmd_source", + entity_category=EntityCategory.DIAGNOSTIC, + icon="mdi:target", + entity_registry_enabled_default=False, + ), +) diff --git a/custom_components/ithodaalderop/definitions/wpu.py b/custom_components/ithodaalderop/definitions/wpu.py new file mode 100644 index 0000000..1fce26b --- /dev/null +++ b/custom_components/ithodaalderop/definitions/wpu.py @@ -0,0 +1,1314 @@ +"""Definitions for Itho WPU sensors added to MQTT.""" + +from homeassistant.components.binary_sensor import BinarySensorDeviceClass +from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import ( + PERCENTAGE, + EntityCategory, + UnitOfElectricCurrent, + UnitOfEnergy, + UnitOfPressure, + UnitOfTemperature, + UnitOfTime, + UnitOfVolumeFlowRate, +) + +from .base import IthoBinarySensorEntityDescription, IthoSensorEntityDescription + +WPU_BINARY_SENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( + IthoBinarySensorEntityDescription( + json_field="Bleeding mode blocked", + key="bleeding_mode_blocked", + device_class=BinarySensorDeviceClass.OPENING, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Blockage", + key="blockage", + device_class=BinarySensorDeviceClass.OPENING, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Boiler mode active", + key="boiler_mode_active", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Boiler blocked from thermostat", + key="boiler_blocked_from_thermostat", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Boiler boost from thermostat", + key="boiler_boost_from_thermostat", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Boiler mode blocked", + key="boiler_mode_blocked", + device_class=BinarySensorDeviceClass.OPENING, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Comfort selected on thermostat", + key="comfort_selected_on_thermostat", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Compressor blocked", + key="compressor_blocked", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Compressor in Cv mode", + key="compressor_in_cv_mode", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Compressor in boiler mode", + key="compressor_in_boiler_mode", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Condensation protection", + key="condensation_protection", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="CV enabled", + key="cv_enabled", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="CV mode active", + key="cv_mode_active", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="CV mode blocked", + key="cv_mode_blocked", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="ECO selected on thermostat", + key="eco_selected_on_thermostat", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Electr element DHW blocked", + key="electr_element_dhw_blocked", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Electr element blocked", + key="electr_element_blocked", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Element blocked during retry", + key="element_blocked_during_retry", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Element in CV mode", + key="element_in_cv_mode", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Element in boiler mode", + key="element_in_boiler_mode", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Element released", + key="element_released", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Error_found", + key="error_found", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Free cooling enabled", + key="free_cooling_enabled", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Free cooling mode active", + key="free_cooling_mode_active", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Free cooling mode blocked", + key="free_cooling_mode_blocked", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Manual operation", + key="manual_operation", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="OT time valid", + key="ot_time_valid", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Off mode active", + key="off_mode_active", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Regeneration active", + key="regeneration_active", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Task active", + key="task_active", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="UTC time valid", + key="utc_time_valid", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoBinarySensorEntityDescription( + json_field="Venting from thermostat", + key="venting_from_thermostat", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), +) + +WPU_ERROR_CODE_BYTE_TEMPLATE = IthoSensorEntityDescription( + json_field="Error code byte ", + key="error_code_byte", + unique_id_template="error_code_byte_x", + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, +) + +WPU_SENSORS: tuple[IthoSensorEntityDescription, ...] = ( + IthoSensorEntityDescription( + json_field="adaptive fifo index", + key="adaptive_fifo_index", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Adaptive overheat (K)", + key="adaptive_overheat", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Adaptive timer (sec)", + key="adaptive_timer", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Additional cooling release", + key="additional_cooling_release", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Block time pre-heating tap water (sec)", + key="block_time_pre_heating_tap_water", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Block time-release external cooling (sec)", + key="block_time_release_external_cooling", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Blocking time trickle low after CV operation (sec)", + key="blocking_time_trickle_low_after_cv_operation", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Blocking time trickle low after power-up (sec.)", + key="blocking_time_trickle_low_after_power_up", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Boiler for _ nadraai (sec)", + key="boiler_for_nadraai", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Boiler pump (%)", + key="boiler_pump_percent", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Boiler temp down (°C)", + key="boiler_temp_down", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Boiler temp up (°C)", + key="boiler_temp_up", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Calculated CV condensation temp (°C)", + key="calculated_cv_condensation_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Calculated condensation temp DHW (°C)", + key="calculated_condensation_temp_dhw", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Calculated evaporation temp CV (°C)", + key="calculated_evaporation_temp_cv", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Calculated evaporation temp DHW (°C)", + key="calculated_evaporation_temp_dhw", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CH mode (h)", + key="ch_mode", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CH mode starts", + key="ch_mode_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CH pump on (h)", + key="ch_pump_on", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CH pump starts", + key="ch_pump_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CO valve position (%)", + key="co_valve_position", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compr block (sec)", + key="compr_block", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compr power on delay (sec)", + key="compr_power_on_delay", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compressed gas temp (°C)", + key="compressed_gas_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compressor", + key="compressor", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compressor current (A)", + key="compressor_current", + device_class=SensorDeviceClass.CURRENT, + native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compressor on (h)", + key="compressor_on", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compressor start (sec)", + key="compressor_start", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Compressor starts", + key="compressor_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Cooling temp control valve setpoint (%)", + key="cooling_temp_control_valve_setpoint", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Correction measurement delta source temperature (K)", + key="correction_measurement_delta_source_temperature", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Current e-element (A)", + key="current_e_element", + native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Current source valve position (%)", + key="current_source_valve_position", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Cv for _ naddraai (sec)", + key="cv_for_naddraai", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CV pressure (Bar)", + key="cv_pressure", + device_class=SensorDeviceClass.PRESSURE, + native_unit_of_measurement=UnitOfPressure.BAR, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Cv pump (%)", + key="cv_pump_percent", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="CV pump prime", + key="cv_pump_prime", + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CV return temp (°C)", + key="cv_return_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Cv start delay (sec)", + key="cv_start_delay", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Cv stop delay (sec)", + key="cv_stop_delay", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CV supply temp (°C)", + key="cv_supply_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="CV_DHW or cooling temp valve (%)", + key="cv_dhw_or_cooling_temp_valve", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="DHW element on (h)", + key="dhw_element_on", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="DHW element starts", + key="dhw_element_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="DHW mode (h)", + key="dhw_mode", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="DHW mode starts", + key="dhw_mode_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="DHW pump on (h)", + key="dhw_pump_on", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="DHW pump starts", + key="dhw_pump_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Delay cv start (sec)", + key="delay_cv_start", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Delay cv stop (sec)", + key="delay_cv_stop", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Delay electr (sec)", + key="delay_electr", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Drain time (sec)", + key="drain_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption DHW (kWh)", + key="e_consumption_dhw", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption cooling (kWh)", + key="e_consumption_cooling", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption during DHW (kWh)", + key="e_consumption_during_dhw", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption during cooling (kWh)", + key="e_consumption_during_cooling", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption during heating (kWh)", + key="e_consumption_during_heating", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption during stand-by (kWh)", + key="e_consumption_during_stand_by", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption heating (kWh)", + key="e_consumption_heating", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="E-consumption stand-by (kWh)", + key="e_consumption_stand_by", + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Electrical element on (h)", + key="electrical_element_on", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Electrical element release (min)", + key="electrical_element_release", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Electrical element starts", + key="electrical_element_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Elek block (sec)", + key="elek_block", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Element", + key="element", + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Energy out of source (MWh)", + key="energy_out_of_source", + native_unit_of_measurement=UnitOfEnergy.MEGA_WATT_HOUR, + state_class=SensorStateClass.TOTAL_INCREASING, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Energy returned to source (MWh)", + key="energy_returned_to_source", + native_unit_of_measurement=UnitOfEnergy.MEGA_WATT_HOUR, + state_class=SensorStateClass.TOTAL_INCREASING, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Error", + key="error", + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="Error_retry", + key="error_retry", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="EV adjust (sec)", + key="ev_adjust", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="EV pressure offset (sec)", + key="ev_pressure_offset", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Evaporator temp (°C)", + key="evaporator_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Expansion valve (pls)", + key="expansion_valve", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="External heating release time (sec)", + key="external_heating_release_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Fault highest priority", + key="fault_highest_priority", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Flow sensor (lt_hr)", + key="flow_sensor", + native_unit_of_measurement="L/h", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ), + IthoSensorEntityDescription( + json_field="FlowHardware", + key="flow_hardware", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling", + key="free_cooling", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling block time (min)", + key="free_cooling_block_time", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling interval (sec)", + key="free_cooling_interval", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling mode", + key="free_cooling_mode", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling mode (h)", + key="free_cooling_mode", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling on time (sec)", + key="free_cooling_on_time", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling starts", + key="free_cooling_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Free cooling valve (%)", + key="free_cooling_valve", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Gateway Time Receive", + key="gateway_time_receive", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Heat demand thermost. (%)", + key="heat_demand", + native_unit_of_measurement=PERCENTAGE, + entity_category=EntityCategory.DIAGNOSTIC, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="HRU blowout flow (m3_h)", + key="hru_blowout_flow", + native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="HRU blowout temp (°C)", + key="hru_blowout_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Heat demand total (%)", + key="heat_demand_total", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="I error sourceflow", + key="i_error_sourceflow", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Latest valid source supply temp. (°C)", + key="latest_valid_source_supply_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Liquid temp (°C)", + key="liquid_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Logging (sec)", + key="logging", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Low pressure timer (sec)", + key="low_pressure_timer", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Manual control (sec)", + key="manual_control", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Max CV return temp (°C)", + key="max_cv_return_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Maximum time for preheating potable water (sec)", + key="maximum_time_for_preheating_potable_water", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Min running time compr (sec)", + key="min_running_time_compr", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Minimum release time external cooling (sec)", + key="minimum_release_time_external_cooling", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Minimum time for preheating potable water (sec)", + key="minimum_time_for_preheating_potable_water", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Outside temp (°C)", + key="outside_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="P source flow error", + key="p_source_flow_error", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Phase detection", + key="phase_detection", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Pi error sourceflow", + key="pi_error_sourceflow", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Preheat tap water", + key="preheat_tap_water", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Pressure switch", + key="pressure_switch", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Pulse counter", + key="pulse_counter", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Requested room temp (°C)", + key="requested_room_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Reserve", + key="reserve", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Room temp (°C)", + key="room_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Slow start well pump (sec)", + key="slow_start_well_pump", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source flow control period (sec)", + key="source_flow_control_period", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source flow glycol compensation (l_h)", + key="source_flow_glycol_compensation", + native_unit_of_measurement="L/h", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source for _ nadraai (sec)", + key="source_for_nadraai", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source pump flow setpoint (l_h)", + key="source_pump_flow_setpoint", + native_unit_of_measurement="L/h", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source pump on (h)", + key="source_pump_on", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source pump speed at free cooling (%)", + key="source_pump_speed_at_free_cooling", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source pump speed free cooling mode", + key="source_pump_speed_free_cooling_mode", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source pump starts", + key="source_pump_starts", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Source return temperature too low (sec.)", + key="source_return_temperature_too_low", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Spare input", + key="spare_input", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Stabilisation waiting time-free cooling (sec.)", + key="stabilisation_waiting_time_free_cooling", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Status", + key="status", + ), + IthoSensorEntityDescription( + json_field="Sub_status", + key="sub_status", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Suction gas temp (°C)", + key="suction_gas_temp", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="System starts", + key="system_starts", + state_class=SensorStateClass.TOTAL_INCREASING, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Tariff", + key="tariff", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Tariff low from thermostat", + key="tariff_low_from_thermostat", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Temp to source (°C)", + key="temp_to_source", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Temp from source (°C)", + key="temp_from_source", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Time CO valve start position (sec)", + key="time_co_valve_start_position", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="time for error history (sec)", + key="time_for_error_history", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Time hours (hrs)", + key="time_hours", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="time seconds (sec)", + key="time_seconds", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Time minutes (min)", + key="time_minutes", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Total runtime (h)", + key="total_runtime", + native_unit_of_measurement=UnitOfTime.HOURS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Trickle heating", + key="trickle_heating", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="UTC time", + key="utc_time", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Utc Time offset (min)", + key="utc_time_offset", + native_unit_of_measurement=UnitOfTime.MINUTES, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Waiting time permanently released element (sec)", + key="waiting_time_permanently_released_element", + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Well pump (%)", + key="well_pump_percent", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + IthoSensorEntityDescription( + json_field="Well pump prime", + key="well_pump_prime", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Well pump speed at airreg (%)", + key="well_pump_speed_at_airreg", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + IthoSensorEntityDescription( + json_field="Well pump speed at compr (%)", + key="well_pump_speed_at_compr", + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), +) diff --git a/custom_components/ithodaalderop/manifest.json b/custom_components/ithodaalderop/manifest.json index e5d878b..74a637b 100644 --- a/custom_components/ithodaalderop/manifest.json +++ b/custom_components/ithodaalderop/manifest.json @@ -14,5 +14,5 @@ "mqtt": ["ithohru/#"], "requirements": [ ], - "version": "2.2.0-b3" + "version": "2.2.0-b6" } diff --git a/custom_components/ithodaalderop/sensor.py b/custom_components/ithodaalderop/sensor.py index 765739b..be12fb6 100644 --- a/custom_components/ithodaalderop/sensor.py +++ b/custom_components/ithodaalderop/sensor.py @@ -4,92 +4,17 @@ Author: Jasper """ -import copy -from datetime import datetime, timedelta -import json - from homeassistant.components import mqtt -from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry -from homeassistant.core import HomeAssistant, callback -from homeassistant.helpers.device_registry import DeviceInfo +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback -from .const import ( - _LOGGER, - ADDON_TYPES, - AUTOTEMP_ERROR, - AUTOTEMP_MODE, - CONF_ADDON_TYPE, - CONF_NONCVE_MODEL, - DOMAIN, - HRUECO350_ACTUAL_MODE, - HRUECO350_GLOBAL_FAULT_CODE, - HRUECO350_RH_ERROR_CODE, - HRUECO250300_ERROR_CODE, - HRUECO_STATUS, - MANUFACTURER, - MQTT_BASETOPIC, - MQTT_STATETOPIC, - NONCVE_DEVICES, - UNITTYPE_ICONS, - WPU_STATUS, -) -from .definitions import ( - AUTOTEMPROOMSENSORS, - AUTOTEMPSENSORS, - CVESENSORS, - HRUECO200SENSORS, - HRUECO350SENSORS, - HRUECO250300SENSORS, - HRUECOSENSORS, - LASTCMDSENSORS, - WPUSENSORS, - IthoSensorEntityDescription, -) - - -def _create_remotes(config_entry: ConfigEntry): - """Create remotes for CO2 monitoring.""" - - cfg = config_entry.data - remotes = [] - for x in range(1, 5): - remote = cfg["remote" + str(x)] - if remote not in ("", "Remote " + str(x)): - remotes.append( - IthoSensorEntityDescription( - json_field=remote, - key=f"{MQTT_BASETOPIC[config_entry.data[CONF_ADDON_TYPE]]}/{MQTT_STATETOPIC["remote"]}", - affix=remote, - translation_key="remote", - translation_placeholders={"remote_name": remote}, - device_class="carbon_dioxide", - native_unit_of_measurement="ppm", - state_class="measurement", - ) - ) - return remotes - - -def _create_autotemprooms(config_entry: ConfigEntry): - """Create autotemp rooms for configured entries.""" - - cfg = config_entry.data - room_sensors = [] - for x in range(1, 8): - template_sensors = copy.deepcopy(list(AUTOTEMPROOMSENSORS)) - room = cfg["room" + str(x)] - if room not in ("", "Room " + str(x)): - for sensor in template_sensors: - sensor.json_field = sensor.json_field.replace("X", str(x)) - sensor.key = ( - f"{MQTT_BASETOPIC["autotemp"]}/{MQTT_STATETOPIC["autotemp"]}" - ) - sensor.affix = room - room_sensors.append(sensor) - - return room_sensors +from .const import _LOGGER, CONF_ADDON_TYPE +from .sensors.autotemp import get_autotemp_sensors +from .sensors.co2_remote import get_co2_remote_sensors +from .sensors.fan import get_cve_sensors, get_noncve_sensors +from .sensors.last_command import get_last_command_sensors +from .sensors.wpu import get_wpu_sensors async def async_setup_entry( @@ -105,424 +30,19 @@ async def async_setup_entry( sensors = [] if config_entry.data[CONF_ADDON_TYPE] == "autotemp": - for description in list(AUTOTEMPSENSORS): - description.key = ( - f"{MQTT_BASETOPIC["autotemp"]}/{MQTT_STATETOPIC["autotemp"]}" - ) - sensors.append(IthoSensorAutotemp(description, config_entry)) - - for description in _create_autotemprooms(config_entry): - description.key = ( - f"{MQTT_BASETOPIC["autotemp"]}/{MQTT_STATETOPIC["autotemp"]}" - ) - sensors.append(IthoSensorAutotempRoom(description, config_entry)) + sensors.extend(get_autotemp_sensors(config_entry)) if config_entry.data[CONF_ADDON_TYPE] == "cve": - for description in CVESENSORS: - description.key = f"{MQTT_BASETOPIC["cve"]}/{MQTT_STATETOPIC["cve"]}" - sensors.append(IthoSensorFan(description, config_entry)) + sensors.extend(get_cve_sensors(config_entry)) if config_entry.data[CONF_ADDON_TYPE] == "noncve": - if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco": - hru_sensors = HRUECOSENSORS - if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco_200": - hru_sensors = HRUECO200SENSORS - if config_entry.data[CONF_NONCVE_MODEL] in ["hru_eco_250", "hru_eco_300"]: - hru_sensors = HRUECO250300SENSORS - if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco_350": - hru_sensors = HRUECO350SENSORS - - for description in hru_sensors: - description.key = f"{MQTT_BASETOPIC["noncve"]}/{MQTT_STATETOPIC["noncve"]}" - sensors.append(IthoSensorFan(description, config_entry)) + sensors.extend(get_noncve_sensors(config_entry)) if config_entry.data[CONF_ADDON_TYPE] in ["cve", "noncve"]: - for description in _create_remotes(config_entry): - description.key = f"{MQTT_BASETOPIC[config_entry.data[CONF_ADDON_TYPE]]}/{MQTT_STATETOPIC["remote"]}" - sensors.append(IthoSensorCO2Remote(description, config_entry)) - - for description in LASTCMDSENSORS: - description.key = f"{MQTT_BASETOPIC[config_entry.data[CONF_ADDON_TYPE]]}/{MQTT_STATETOPIC["last_cmd"]}" - sensors.append(IthoSensorLastCommand(description, config_entry)) + sensors.extend(get_co2_remote_sensors(config_entry)) + sensors.extend(get_last_command_sensors(config_entry)) if config_entry.data[CONF_ADDON_TYPE] == "wpu": - for description in WPUSENSORS: - description.key = f"{MQTT_BASETOPIC["wpu"]}/{MQTT_STATETOPIC["wpu"]}" - sensors.append(IthoSensorWPU(description, config_entry)) + sensors.extend(get_wpu_sensors(config_entry)) async_add_entities(sensors) - - -class IthoBaseSensor(SensorEntity): - """Base class sharing foundation for WPU, remotes and Fans.""" - - _attr_has_entity_name = True - entity_description: IthoSensorEntityDescription - - _extra_state_attributes = None - - def __init__( - self, - description: IthoSensorEntityDescription, - config_entry: ConfigEntry, - unique_id: str | None = None, - use_base_sensor_device: bool = True, - ) -> None: - """Initialize the sensor.""" - self.entity_description = description - - if use_base_sensor_device: - model = ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]] - if config_entry.data[CONF_ADDON_TYPE] == "noncve": - model = ( - model + " - " + NONCVE_DEVICES[config_entry.data[CONF_NONCVE_MODEL]] - ) - - self._attr_device_info = DeviceInfo( - identifiers={(DOMAIN, config_entry.data[CONF_ADDON_TYPE])}, - manufacturer=MANUFACTURER, - model=model, - name=ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]], - ) - - if unique_id is not None: - self._attr_unique_id = unique_id - else: - self._attr_unique_id = f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.translation_key}" - self.entity_id = f"sensor.{self._attr_unique_id}" - - @property - def icon(self) -> str | None: - """Pick the right icon.""" - - if self.entity_description.icon is not None: - return self.entity_description.icon - if self.entity_description.native_unit_of_measurement in UNITTYPE_ICONS: - return UNITTYPE_ICONS[self.entity_description.native_unit_of_measurement] - return None - - -class IthoSensorAutotemp(IthoBaseSensor): - """Representation of Itho add-on sensor for Autotemp data that is updated via MQTT.""" - - def __init__( - self, - description: IthoSensorEntityDescription, - config_entry: ConfigEntry, - unique_id: str | None = None, - ) -> None: - """Construct sensor for Autotemp.""" - if description.affix is not None: - unique_id = f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.translation_key}_{description.affix.lower()}" - super().__init__(description, config_entry, unique_id) - - async def async_added_to_hass(self) -> None: - """Subscribe to MQTT events.""" - - @callback - def message_received(message): - """Handle new MQTT messages.""" - payload = json.loads(message.payload) - json_field = self.entity_description.json_field - if json_field not in payload: - value = None - else: - value = payload[json_field] - if json_field == "Error": - self._extra_state_attributes = { - "Code": value, - } - value = AUTOTEMP_ERROR.get(value, "Unknown error") - - if json_field == "Mode": - self._extra_state_attributes = { - "Code": value, - } - value = AUTOTEMP_MODE.get(value, "Unknown mode") - - if json_field == "State off": - if value == 1: - value = "Off" - if payload["State cool"] == 1: - value = "Cooling" - if payload["State heating"] == 1: - value = "Heating" - if payload["state hand"] == 1: - value = "Hand" - - self._attr_native_value = value - self.async_write_ha_state() - - await mqtt.async_subscribe( - self.hass, self.entity_description.key, message_received, 1 - ) - - -class IthoSensorAutotempRoom(IthoBaseSensor): - """Representation of Itho add-on room sensor for Autotemp data that is updated via MQTT.""" - - def __init__( - self, description: IthoSensorEntityDescription, config_entry: ConfigEntry - ) -> None: - """Construct sensor for Autotemp.""" - unique_id = f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.translation_key}_{description.affix.lower()}" - - self._attr_device_info = DeviceInfo( - identifiers={ - ( - DOMAIN, - f"{config_entry.data[CONF_ADDON_TYPE]}_room_{description.affix.lower()}", - ) - }, - manufacturer=MANUFACTURER, - model=f"{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]} Spider", - name=f"Spider {description.affix.capitalize()}", - via_device=(DOMAIN, config_entry.data[CONF_ADDON_TYPE]), - ) - - super().__init__( - description, config_entry, unique_id, use_base_sensor_device=False - ) - - async def async_added_to_hass(self) -> None: - """Subscribe to MQTT events.""" - - @callback - def message_received(message): - """Handle new MQTT messages.""" - payload = json.loads(message.payload) - value = payload.get(self.entity_description.json_field, None) - - self._attr_native_value = value - self.async_write_ha_state() - - await mqtt.async_subscribe( - self.hass, self.entity_description.key, message_received, 1 - ) - - -class IthoSensorCO2Remote(IthoBaseSensor): - """Representation of Itho add-on sensor for a Remote that is updated via MQTT.""" - - def __init__( - self, description: IthoSensorEntityDescription, config_entry: ConfigEntry - ) -> None: - """Construct sensor for Remote.""" - unique_id = f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.translation_key}_{description.affix.lower()}" - super().__init__(description, config_entry, unique_id) - - async def async_added_to_hass(self) -> None: - """Subscribe to MQTT events.""" - - @callback - def message_received(message): - """Handle new MQTT messages.""" - payload = json.loads(message.payload) - json_field = self.entity_description.json_field - if json_field not in payload: - value = None - else: - value = payload[json_field]["co2"] - - self._attr_native_value = value - self.async_write_ha_state() - - await mqtt.async_subscribe( - self.hass, self.entity_description.key, message_received, 1 - ) - - -class IthoSensorFan(IthoBaseSensor): - """Representation of a Itho add-on sensor that is updated via MQTT.""" - - _attr_has_entity_name = True - entity_description: IthoSensorEntityDescription - - _extra_state_attributes = None - - def __init__( - self, - description: IthoSensorEntityDescription, - config_entry: ConfigEntry, - ) -> None: - """Initialize the sensor.""" - super().__init__(description, config_entry) - - @property - def extra_state_attributes(self) -> list[str] | None: - """Return the state attributes.""" - return self._extra_state_attributes - - async def async_added_to_hass(self) -> None: - """Subscribe to MQTT events.""" - - @callback - def message_received(message): - """Handle new MQTT messages.""" - payload = json.loads(message.payload) - json_field = self.entity_description.json_field - if json_field not in payload: - value = None - else: - value = payload[json_field] - # HRU ECO 350 - if json_field == "Actual Mode": - self._extra_state_attributes = {"Code": value} - value = HRUECO350_ACTUAL_MODE.get(value, "Unknown mode") - - # HRU ECO 350 - if json_field == "Air Quality (%)": - _error_description = "Unknown error code" - if isinstance(value, (int, float)) and float(value) > 100: - _error_description = "Unknown error" - value = None - - self._extra_state_attributes = { - "Error Description": _error_description, - } - - # HRU ECO 350 / HRU ECO - if json_field in ["Airfilter counter", "Air filter counter"]: - _last_maintenance = "" - _next_maintenance_estimate = "" - if str(value).isnumeric(): - _last_maintenance = ( - datetime.now() - timedelta(hours=int(value)) - ).date() - _next_maintenance_estimate = ( - datetime.now() + timedelta(days=180, hours=-int(value)) - ).date() - else: - _last_maintenance = "Invalid value" - - self._extra_state_attributes = { - "Last Maintenance": _last_maintenance, - "Next Maintenance Estimate": _next_maintenance_estimate, - } - - # HRU ECO 250/300 - if json_field == "Error number": - _description = "" - if str(value).isnumeric(): - _error_description = HRUECO250300_ERROR_CODE.get( - int(value), _description - ) - - self._extra_state_attributes = { - "Description": _description, - } - - # HRU ECO 350 - if json_field == "Global fault code": - _description = "Unknown fault code" - if str(value).isnumeric(): - _description = HRUECO350_GLOBAL_FAULT_CODE.get( - int(value), _description - ) - - self._extra_state_attributes = { - "Description": _description, - } - - # HRU ECO 350 - if json_field == "Highest received RH value (%RH)": - _error_description = "" - if isinstance(value, (int, float)) and float(value) > 100: - _error_description = HRUECO350_RH_ERROR_CODE.get( - int(value), "Unknown error" - ) - value = None - - self._extra_state_attributes = { - "Error Description": _error_description, - } - - # HRU ECO - if json_field == "Status": - self._extra_state_attributes = { - "Code": value, - } - - _description = "Unknown status" - if str(value).isnumeric(): - _description = HRUECO_STATUS.get(int(value), _description) - value = _description - - self._attr_native_value = value - self.async_write_ha_state() - - await mqtt.async_subscribe( - self.hass, self.entity_description.key, message_received, 1 - ) - - -class IthoSensorLastCommand(IthoBaseSensor): - """Representation of Itho add-on sensor for Last Command that is updated via MQTT.""" - - def __init__( - self, description: IthoSensorEntityDescription, config_entry: ConfigEntry - ) -> None: - """Construct sensor for WPU.""" - super().__init__(description, config_entry) - - async def async_added_to_hass(self) -> None: - """Subscribe to MQTT events.""" - - @callback - def message_received(message): - """Handle new MQTT messages.""" - payload = json.loads(message.payload) - value = payload.get(self.entity_description.json_field, None) - - self._attr_native_value = value - self.async_write_ha_state() - - await mqtt.async_subscribe( - self.hass, self.entity_description.key, message_received, 1 - ) - - -class IthoSensorWPU(IthoBaseSensor): - """Representation of Itho add-on sensor for WPU that is updated via MQTT.""" - - def __init__( - self, description: IthoSensorEntityDescription, config_entry: ConfigEntry - ) -> None: - """Construct sensor for WPU.""" - super().__init__(description, config_entry) - - async def async_added_to_hass(self) -> None: - """Subscribe to MQTT events.""" - - @callback - def message_received(message): - """Handle new MQTT messages.""" - payload = json.loads(message.payload) - json_field = self.entity_description.json_field - if json_field not in payload: - value = None - else: - value = payload[json_field] - if json_field == "Status": - self._extra_state_attributes = { - "Code": value, - } - value = WPU_STATUS.get(int(value), "Unknown status") - if json_field == "ECO selected on thermostat": - if value == 1: - value = "Eco" - if payload["Comfort selected on thermostat"] == 1: - value = "Comfort" - if payload["Boiler boost from thermostat"] == 1: - value = "Boost" - if payload["Boiler blocked from thermostat"] == 1: - value = "Off" - if payload["Venting from thermostat"] == 1: - value = "Venting" - - self._attr_native_value = value - self.async_write_ha_state() - - await mqtt.async_subscribe( - self.hass, self.entity_description.key, message_received, 1 - ) diff --git a/custom_components/ithodaalderop/sensors/__init__.py b/custom_components/ithodaalderop/sensors/__init__.py new file mode 100644 index 0000000..8fc0a51 --- /dev/null +++ b/custom_components/ithodaalderop/sensors/__init__.py @@ -0,0 +1 @@ +"""Init package.""" diff --git a/custom_components/ithodaalderop/sensors/autotemp.py b/custom_components/ithodaalderop/sensors/autotemp.py new file mode 100644 index 0000000..e6f38d2 --- /dev/null +++ b/custom_components/ithodaalderop/sensors/autotemp.py @@ -0,0 +1,182 @@ +"""Sensor class for handling Autotemp sensors.""" + +import copy +import json + +from homeassistant.components import mqtt +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import callback +from homeassistant.helpers.device_registry import DeviceInfo + +from ..const import ( # noqa: TID252 + ADDON_TYPES, + AUTOTEMP_ERROR, + AUTOTEMP_MODE, + CONF_ADDON_TYPE, + DOMAIN, + MANUFACTURER, + MQTT_BASETOPIC, + MQTT_STATETOPIC, +) +from ..definitions.autotemp import ( # noqa: TID252 + AUTOTEMP_COMM_SPACE_SENSOR_TEMPLATE, + AUTOTEMP_DISTRIBUTOR_VALVE_SENSOR_TEMPLATE, + AUTOTEMP_MALFUNCTION_VALVE_DECTECTION_DIST_SENSOR_TEMPLATE, + AUTOTEMP_ROOM_SENSORS, + AUTOTEMP_SENSORS, + AUTOTEMP_VALVE_SENSOR_TEMPLATE, +) +from ..definitions.base import IthoSensorEntityDescription # noqa: TID252 +from ..sensors.base import IthoBaseSensor # noqa: TID252 + + +def get_autotemp_sensors(config_entry: ConfigEntry): + """Create sensors for Autotemp.""" + sensors = [] + topic = f"{MQTT_BASETOPIC["autotemp"]}/{MQTT_STATETOPIC["autotemp"]}" + for letter in ("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"): + description = copy.deepcopy(AUTOTEMP_COMM_SPACE_SENSOR_TEMPLATE) + description.topic = topic + description.json_field = description.json_field.replace("X", letter) + description.translation_placeholders = {"letter": letter} + description.unique_id = description.unique_id_template.replace("x", letter) + sensors.append(IthoSensorAutotemp(description, config_entry)) + + for d in range(1, 4): + for v in range(1, 13): + d = str(d) + v = str(v) + description = copy.deepcopy(AUTOTEMP_DISTRIBUTOR_VALVE_SENSOR_TEMPLATE) + description.topic = topic + description.json_field = description.json_field.replace("X", d).replace( + "Y", v + ) + description.translation_placeholders = {"distributor": d, "valve": v} + description.unique_id = description.unique_id_template.replace( + "x", d + ).replace("y", v) + sensors.append(IthoSensorAutotemp(description, config_entry)) + + for d in range(1, 4): + d = str(d) + description = copy.deepcopy( + AUTOTEMP_MALFUNCTION_VALVE_DECTECTION_DIST_SENSOR_TEMPLATE + ) + description.topic = topic + description.json_field = description.json_field.replace("X", d) + description.translation_placeholders = {"distributor": d} + description.unique_id = description.unique_id_template.replace("x", d) + sensors.append(IthoSensorAutotemp(description, config_entry)) + + for v in range(1, 4): + v = str(v) + template_sensors = copy.deepcopy(list(AUTOTEMP_VALVE_SENSOR_TEMPLATE)) + for description in template_sensors: + description.topic = topic + description.json_field = description.json_field.replace("X", v) + description.translation_placeholders = {"valve": v} + description.unique_id = description.unique_id_template.replace("x", v) + sensors.append(IthoSensorAutotemp(description, config_entry)) + + for description in AUTOTEMP_SENSORS: + description.topic = topic + sensors.append(IthoSensorAutotemp(description, config_entry)) + + # Create Room devices + for x in range(1, 8): + template_sensors = copy.deepcopy(list(AUTOTEMP_ROOM_SENSORS)) + room = config_entry.data["room" + str(x)] + if room not in ("", "Room " + str(x)): + for description in template_sensors: + description.json_field = description.json_field.replace("X", str(x)) + description.topic = topic + description.room = room + description.unique_id = f"{description.key}_{room}" + sensors.append(IthoSensorAutotempRoom(description, config_entry)) + + return sensors + + +class IthoSensorAutotemp(IthoBaseSensor): + """Representation of Itho add-on sensor for Autotemp data that is updated via MQTT.""" + + async def async_added_to_hass(self) -> None: + """Subscribe to MQTT events.""" + + @callback + def message_received(message): + """Handle new MQTT messages.""" + payload = json.loads(message.payload) + json_field = self.entity_description.json_field + if json_field not in payload: + value = None + else: + value = payload[json_field] + if json_field == "Error": + self._extra_state_attributes = { + "Code": value, + } + value = AUTOTEMP_ERROR.get(value, "Unknown error") + + if json_field == "Mode": + self._extra_state_attributes = { + "Code": value, + } + value = AUTOTEMP_MODE.get(value, "Unknown mode") + + if json_field == "State off": + if value == 1: + value = "Off" + if payload["State cool"] == 1: + value = "Cooling" + if payload["State heating"] == 1: + value = "Heating" + if payload["state hand"] == 1: + value = "Hand" + + self._attr_native_value = value + self.async_write_ha_state() + + await mqtt.async_subscribe( + self.hass, self.entity_description.topic, message_received, 1 + ) + + +class IthoSensorAutotempRoom(IthoBaseSensor): + """Representation of Itho add-on room sensor for Autotemp data that is updated via MQTT.""" + + def __init__( + self, description: IthoSensorEntityDescription, config_entry: ConfigEntry + ) -> None: + """Construct sensor for Autotemp.""" + + self._attr_device_info = DeviceInfo( + identifiers={ + ( + DOMAIN, + f"{config_entry.data[CONF_ADDON_TYPE]}_room_{description.room.lower()}", + ) + }, + manufacturer=MANUFACTURER, + model=f"{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]} Spider", + name=f"Spider {description.room.capitalize()}", + via_device=(DOMAIN, config_entry.data[CONF_ADDON_TYPE]), + ) + + super().__init__(description, config_entry, use_base_sensor_device=False) + + async def async_added_to_hass(self) -> None: + """Subscribe to MQTT events.""" + + @callback + def message_received(message): + """Handle new MQTT messages.""" + payload = json.loads(message.payload) + value = payload.get(self.entity_description.json_field, None) + + self._attr_native_value = value + self.async_write_ha_state() + + await mqtt.async_subscribe( + self.hass, self.entity_description.topic, message_received, 1 + ) diff --git a/custom_components/ithodaalderop/sensors/base.py b/custom_components/ithodaalderop/sensors/base.py new file mode 100644 index 0000000..32df10d --- /dev/null +++ b/custom_components/ithodaalderop/sensors/base.py @@ -0,0 +1,70 @@ +"""Sensor base class.""" + +from homeassistant.components.sensor import SensorEntity +from homeassistant.config_entries import ConfigEntry +from homeassistant.helpers.device_registry import DeviceInfo + +from ..const import ( # noqa: TID252 + ADDON_TYPES, + CONF_ADDON_TYPE, + CONF_NONCVE_MODEL, + DOMAIN, + MANUFACTURER, + NONCVE_DEVICES, + UNITTYPE_ICONS, +) +from ..definitions.base import IthoSensorEntityDescription # noqa: TID252 + + +class IthoBaseSensor(SensorEntity): + """Base class sharing foundation for WPU, remotes and Fans.""" + + _attr_has_entity_name = True + entity_description: IthoSensorEntityDescription + + _extra_state_attributes: list[str] | None = None + + @property + def extra_state_attributes(self) -> list[str] | None: + """Return the state attributes.""" + return self._extra_state_attributes + + def __init__( + self, + description: IthoSensorEntityDescription, + config_entry: ConfigEntry, + use_base_sensor_device: bool = True, + ) -> None: + """Initialize the sensor.""" + self.entity_description = description + self.entity_description.translation_key = self.entity_description.key + + if use_base_sensor_device: + model = ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]] + if config_entry.data[CONF_ADDON_TYPE] == "noncve": + model = ( + f"{model} - {NONCVE_DEVICES[config_entry.data[CONF_NONCVE_MODEL]]}" + ) + + self._attr_device_info = DeviceInfo( + identifiers={(DOMAIN, config_entry.data[CONF_ADDON_TYPE])}, + manufacturer=MANUFACTURER, + model=model, + name=ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]], + ) + + if description.unique_id is not None: + self._attr_unique_id = f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.unique_id.lower()}" + else: + self._attr_unique_id = f"itho_{ADDON_TYPES[config_entry.data[CONF_ADDON_TYPE]]}_{description.key}" + self.entity_id = f"sensor.{self._attr_unique_id}" + + @property + def icon(self) -> str | None: + """Pick the right icon.""" + + if self.entity_description.icon is not None: + return self.entity_description.icon + if self.entity_description.native_unit_of_measurement in UNITTYPE_ICONS: + return UNITTYPE_ICONS[self.entity_description.native_unit_of_measurement] + return None diff --git a/custom_components/ithodaalderop/sensors/co2_remote.py b/custom_components/ithodaalderop/sensors/co2_remote.py new file mode 100644 index 0000000..967d147 --- /dev/null +++ b/custom_components/ithodaalderop/sensors/co2_remote.py @@ -0,0 +1,53 @@ +"""Sensor class for handling CO2 Remote sensors.""" + +import copy +import json + +from homeassistant.components import mqtt +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import callback + +from ..const import CONF_ADDON_TYPE, MQTT_BASETOPIC, MQTT_STATETOPIC # noqa: TID252 +from ..definitions.co2_remote import REMOTE_SENSOR_TEMPLATE # noqa: TID252 +from .base import IthoBaseSensor + + +def get_co2_remote_sensors(config_entry: ConfigEntry): + """Create remotes for CO2 monitoring.""" + sensors = [] + topic = f"{MQTT_BASETOPIC[config_entry.data[CONF_ADDON_TYPE]]}/{MQTT_STATETOPIC["remote"]}" + for x in range(1, 5): + remote = config_entry.data["remote" + str(x)] + if remote not in ("", "Remote " + str(x)): + description = copy.deepcopy(REMOTE_SENSOR_TEMPLATE) + description.topic = topic + description.json_field = remote + description.translation_placeholders = {"remote_name": remote} + description.unique_id = remote + sensors.append(IthoSensorCO2Remote(description, config_entry)) + + return sensors + + +class IthoSensorCO2Remote(IthoBaseSensor): + """Representation of Itho add-on sensor for a Remote that is updated via MQTT.""" + + async def async_added_to_hass(self) -> None: + """Subscribe to MQTT events.""" + + @callback + def message_received(message): + """Handle new MQTT messages.""" + payload = json.loads(message.payload) + json_field = self.entity_description.json_field + if json_field not in payload: + value = None + else: + value = payload[json_field]["co2"] + + self._attr_native_value = value + self.async_write_ha_state() + + await mqtt.async_subscribe( + self.hass, self.entity_description.topic, message_received, 1 + ) diff --git a/custom_components/ithodaalderop/sensors/fan.py b/custom_components/ithodaalderop/sensors/fan.py new file mode 100644 index 0000000..ad2e7a0 --- /dev/null +++ b/custom_components/ithodaalderop/sensors/fan.py @@ -0,0 +1,164 @@ +"""Sensor class for handling Fan sensors.""" + +from datetime import datetime, timedelta +import json + +from homeassistant.components import mqtt +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import callback + +from ..const import ( # noqa: TID252 + CONF_NONCVE_MODEL, + HRU_ECO_250_300_ERROR_CODE, + HRU_ECO_350_ACTUAL_MODE, + HRU_ECO_350_GLOBAL_FAULT_CODE, + HRU_ECO_350_RH_ERROR_CODE, + HRU_ECO_STATUS, + MQTT_BASETOPIC, + MQTT_STATETOPIC, +) +from ..definitions.cve import CVE_SENSORS # noqa: TID252 +from ..definitions.hru200 import HRU_ECO_200_SENSORS # noqa: TID252 +from ..definitions.hru250_300 import HRU_ECO_250_300_SENSORS # noqa: TID252 +from ..definitions.hru350 import HRU_ECO_350_SENSORS # noqa: TID252 +from ..definitions.hrueco import HRU_ECO_SENSORS # noqa: TID252 +from .base import IthoBaseSensor # noqa: TID252 + + +def get_cve_sensors(config_entry: ConfigEntry): + """Create sensors for CVE.""" + sensors = [] + topic = f"{MQTT_BASETOPIC["cve"]}/{MQTT_STATETOPIC["cve"]}" + + for description in CVE_SENSORS: + description.topic = topic + sensors.append(IthoSensorFan(description, config_entry)) + + return sensors + + +def get_noncve_sensors(config_entry: ConfigEntry): + """Create sensors for NON-CVE.""" + sensors = [] + topic = f"{MQTT_BASETOPIC["noncve"]}/{MQTT_STATETOPIC["noncve"]}" + + if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco": + hru_sensors = HRU_ECO_SENSORS + if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco_200": + hru_sensors = HRU_ECO_200_SENSORS + if config_entry.data[CONF_NONCVE_MODEL] in ["hru_eco_250", "hru_eco_300"]: + hru_sensors = HRU_ECO_250_300_SENSORS + if config_entry.data[CONF_NONCVE_MODEL] == "hru_eco_350": + hru_sensors = HRU_ECO_350_SENSORS + + for description in hru_sensors: + description.topic = topic + sensors.append(IthoSensorFan(description, config_entry)) + + return sensors + + +class IthoSensorFan(IthoBaseSensor): + """Representation of a Itho add-on sensor that is updated via MQTT.""" + + async def async_added_to_hass(self) -> None: + """Subscribe to MQTT events.""" + + @callback + def message_received(message): + """Handle new MQTT messages.""" + payload = json.loads(message.payload) + json_field = self.entity_description.json_field + if json_field not in payload: + value = None + else: + value = payload[json_field] + # HRU ECO 350 + if json_field == "Actual Mode": + self._extra_state_attributes = {"Code": value} + value = HRU_ECO_350_ACTUAL_MODE.get(value, "Unknown mode") + + # HRU ECO 350 + if json_field == "Air Quality (%)": + _error_description = "Unknown error code" + if isinstance(value, (int, float)) and float(value) > 100: + _error_description = "Unknown error" + value = None + + self._extra_state_attributes = { + "Error Description": _error_description, + } + + # HRU ECO 350 / HRU ECO + if json_field in ["Airfilter counter", "Air filter counter"]: + _last_maintenance = "" + _next_maintenance_estimate = "" + if str(value).isnumeric(): + _last_maintenance = ( + datetime.now() - timedelta(hours=int(value)) + ).date() + _next_maintenance_estimate = ( + datetime.now() + timedelta(days=180, hours=-int(value)) + ).date() + else: + _last_maintenance = "Invalid value" + + self._extra_state_attributes = { + "Last Maintenance": _last_maintenance, + "Next Maintenance Estimate": _next_maintenance_estimate, + } + + # HRU ECO 250/300 + if json_field == "Error number": + _description = "" + if str(value).isnumeric(): + _error_description = HRU_ECO_250_300_ERROR_CODE.get( + int(value), _description + ) + + self._extra_state_attributes = { + "Description": _description, + } + + # HRU ECO 350 + if json_field == "Global fault code": + _description = "Unknown fault code" + if str(value).isnumeric(): + _description = HRU_ECO_350_GLOBAL_FAULT_CODE.get( + int(value), _description + ) + + self._extra_state_attributes = { + "Description": _description, + } + + # HRU ECO 350 + if json_field == "Highest received RH value (%RH)": + _error_description = "" + if isinstance(value, (int, float)) and float(value) > 100: + _error_description = HRU_ECO_350_RH_ERROR_CODE.get( + int(value), "Unknown error" + ) + value = None + + self._extra_state_attributes = { + "Error Description": _error_description, + } + + # HRU ECO + if json_field == "Status": + self._extra_state_attributes = { + "Code": value, + } + + _description = "Unknown status" + if str(value).isnumeric(): + _description = HRU_ECO_STATUS.get(int(value), _description) + value = _description + + self._attr_native_value = value + self.async_write_ha_state() + + await mqtt.async_subscribe( + self.hass, self.entity_description.topic, message_received, 1 + ) diff --git a/custom_components/ithodaalderop/sensors/last_command.py b/custom_components/ithodaalderop/sensors/last_command.py new file mode 100644 index 0000000..efda275 --- /dev/null +++ b/custom_components/ithodaalderop/sensors/last_command.py @@ -0,0 +1,42 @@ +"""Sensor class for handling Last Command sensors.""" + +import json + +from homeassistant.components import mqtt +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import callback + +from ..const import CONF_ADDON_TYPE, MQTT_BASETOPIC, MQTT_STATETOPIC # noqa: TID252 +from ..definitions.last_command import LAST_CMD_SENSORS # noqa: TID252 +from .base import IthoBaseSensor + + +def get_last_command_sensors(config_entry: ConfigEntry): + """Create sensors for Last Command.""" + sensors = [] + topic = f"{MQTT_BASETOPIC[config_entry.data[CONF_ADDON_TYPE]]}/{MQTT_STATETOPIC["last_cmd"]}" + for description in LAST_CMD_SENSORS: + description.topic = topic + sensors.append(IthoSensorLastCommand(description, config_entry)) + + return sensors + + +class IthoSensorLastCommand(IthoBaseSensor): + """Representation of Itho add-on sensor for Last Command that is updated via MQTT.""" + + async def async_added_to_hass(self) -> None: + """Subscribe to MQTT events.""" + + @callback + def message_received(message): + """Handle new MQTT messages.""" + payload = json.loads(message.payload) + value = payload.get(self.entity_description.json_field, None) + + self._attr_native_value = value + self.async_write_ha_state() + + await mqtt.async_subscribe( + self.hass, self.entity_description.topic, message_received, 1 + ) diff --git a/custom_components/ithodaalderop/sensors/wpu.py b/custom_components/ithodaalderop/sensors/wpu.py new file mode 100644 index 0000000..81b5c18 --- /dev/null +++ b/custom_components/ithodaalderop/sensors/wpu.py @@ -0,0 +1,72 @@ +"""Sensor class for handling WPU sensors.""" + +import copy +import json + +from homeassistant.components import mqtt +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import callback + +from ..const import MQTT_BASETOPIC, MQTT_STATETOPIC, WPU_STATUS # noqa: TID252 +from ..definitions.wpu import WPU_ERROR_CODE_BYTE_TEMPLATE, WPU_SENSORS # noqa: TID252 +from .base import IthoBaseSensor + + +def get_wpu_sensors(config_entry: ConfigEntry): + """Create sensors for WPU.""" + sensors = [] + topic = f"{MQTT_BASETOPIC["wpu"]}/{MQTT_STATETOPIC["wpu"]}" + for x in range(6): + x = str(x) + description = copy.deepcopy(WPU_ERROR_CODE_BYTE_TEMPLATE) + description.topic = topic + description.json_field = description.json_field + x + description.translation_placeholders = {"num": x} + description.unique_id = description.unique_id_template.replace("x", x) + sensors.append(IthoSensorWPU(description, config_entry)) + + for description in WPU_SENSORS: + description.topic = topic + sensors.append(IthoSensorWPU(description, config_entry)) + + return sensors + + +class IthoSensorWPU(IthoBaseSensor): + """Representation of Itho add-on sensor for WPU that is updated via MQTT.""" + + async def async_added_to_hass(self) -> None: + """Subscribe to MQTT events.""" + + @callback + def message_received(message): + """Handle new MQTT messages.""" + payload = json.loads(message.payload) + json_field = self.entity_description.json_field + if json_field not in payload: + value = None + else: + value = payload[json_field] + if json_field == "Status": + self._extra_state_attributes = { + "Code": value, + } + value = WPU_STATUS.get(int(value), "Unknown status") + if json_field == "ECO selected on thermostat": + if value == 1: + value = "Eco" + if payload["Comfort selected on thermostat"] == 1: + value = "Comfort" + if payload["Boiler boost from thermostat"] == 1: + value = "Boost" + if payload["Boiler blocked from thermostat"] == 1: + value = "Off" + if payload["Venting from thermostat"] == 1: + value = "Venting" + + self._attr_native_value = value + self.async_write_ha_state() + + await mqtt.async_subscribe( + self.hass, self.entity_description.topic, message_received, 1 + ) diff --git a/custom_components/ithodaalderop/translations/en.json b/custom_components/ithodaalderop/translations/en.json index efc1ecc..745b4e0 100644 --- a/custom_components/ithodaalderop/translations/en.json +++ b/custom_components/ithodaalderop/translations/en.json @@ -1,14 +1,119 @@ { "entity": { "binary_sensor": { + "bleeding_mode_blocked": { + "name": "Bleeding Mode Blocked" + }, + "blockage": { + "name": "Blockage" + }, + "boiler_blocked_from_thermostat": { + "name": "Boiler Blocked from Thermostat" + }, + "boiler_boost_from_thermostat": { + "name": "Boiler Boost from Thermostat" + }, + "boiler_mode_active": { + "name": "Boiler Mode Active" + }, + "boiler_mode_blocked": { + "name": "Boiler Mode Blocked" + }, "bypass_position": { "name": "Bypass Position" }, + "comfort_selected_on_thermostat": { + "name": "Comfort Mode Selected on Thermostat" + }, + "compressor_blocked": { + "name": "Compressor Blocked" + }, + "compressor_in_boiler_mode": { + "name": "Compressor in Boiler Mode" + }, + "compressor_in_cv_mode": { + "name": "Compressor in CV Mode" + }, + "condensation_protection": { + "name": "Condensation Protection" + }, + "cv_enabled": { + "name": "CV Mode Enabled" + }, + "cv_mode_active": { + "name": "CV Mode Active" + }, + "cv_mode_blocked": { + "name": "CV Mode Blocked" + }, + "eco_selected_on_thermostat": { + "name": "ECO Mode Selected on Thermostat" + }, + "electr_element_blocked": { + "name": "Electrical Element Blocked" + }, + "electr_element_dhw_blocked": { + "name": "Electrical Element for DHW Blocked" + }, + "element_blocked_during_retry": { + "name": "Element Blocked During Retry" + }, + "element_in_boiler_mode": { + "name": "Element in Boiler Mode" + }, + "element_in_cv_mode": { + "name": "Element in CV Mode" + }, + "element_released": { + "name": "Element Released" + }, + "empty_battery": { + "name": "Empty Battery" + }, + "error_found": { + "name": "Error Found" + }, "filter_dirty": { "name": "Filter Dirty" + }, + "free_cooling_enabled": { + "name": "Free Cooling Enabled" + }, + "free_cooling_mode_active": { + "name": "Free Cooling Mode Active" + }, + "free_cooling_mode_blocked": { + "name": "Free Cooling Mode Blocked" + }, + "manual_operation": { + "name": "Manual Operation" + }, + "ot_time_valid": { + "name": "OT Time Valid" + }, + "off_mode_active": { + "name": "Off Mode Active" + }, + "regeneration_active": { + "name": "Regeneration Active" + }, + "task_active": { + "name": "Task Active" + }, + "utc_time_valid": { + "name": "UTC Time Valid" + }, + "valve_position": { + "name": "Valve Position" + }, + "venting_from_thermostat": { + "name": "Venting from Thermostat" } }, "sensor": { + "absence": { + "name": "Absence" + }, "absolute_fanspeed": { "name": "Absolute Fan Speed" }, @@ -33,6 +138,18 @@ "actual_temp": { "name": "Actual Temperature" }, + "adaptive_fifo_index": { + "name": "Adaptive FIFO Index" + }, + "adaptive_overheat": { + "name": "Adaptive Overheat" + }, + "adaptive_timer": { + "name": "Adaptive Timer" + }, + "additional_cooling_release": { + "name": "Additional Cooling Release" + }, "air_discharge_temp": { "name": "Air Discharge Temperature" }, @@ -48,149 +165,653 @@ "balance": { "name": "Balance" }, + "block_time_pre_heating_tap_water": { + "name": "Block Time for Preheating Tap Water" + }, + "block_time_release_external_cooling": { + "name": "Block Time for External Cooling Release" + }, + "block_timer_bypass": { + "name": "Block Timer for Bypass" + }, + "blocking_time_trickle_low_after_cv_operation": { + "name": "Blocking Time Trickle Low After CV Operation" + }, + "blocking_time_trickle_low_after_power_up": { + "name": "Blocking Time Trickle Low After Power-Up" + }, "blown_out_air_temp": { - "name": "Blown Out Air Temperature" - }, + "name": "Blown Out Air Temperature" + }, + "boiler_for_nadraai": { + "name": "Boiler for Afterrun" + }, + "boiler_pump": { + "name": "Boiler Pump" + }, "boiler_pump_percent": { "name": "Boiler Pump" }, + "boiler_temp_down": { + "name": "Boiler Temperature Decrease" + }, "boiler_temp_up": { "name": "Boiler Temp Up" }, + "boiler_timer": { + "name": "Boiler Timer" + }, + "busy_doing_adjustments": { + "name": "Busy Doing Adjustments" + }, + "bypass_mode": { + "name": "Bypass Mode" + }, + "bypass_position": { + "name": "Bypass Position" + }, + "bypass_setpoint": { + "name": "Bypass Setpoint" + }, "bypass_valve_open": { - "name": "Bypass Valve Open" - }, + "name": "Bypass Valve Open" + }, + "calculated_condensation_temp_dhw": { + "name": "Calculated DHW Condensation Temperature" + }, + "calculated_cv_condensation_temp": { + "name": "Calculated CV Condensation Temperature" + }, + "calculated_evaporation_temp_cv": { + "name": "Calculated Evaporation Temp (CV)" + }, + "calculated_evaporation_temp_dhw": { + "name": "Calculated Evaporation Temp (DHW)" + }, + "ch_mode": { + "name": "Central Heating Mode" + }, + "ch_mode_starts": { + "name": "Central Heating Mode Starts" + }, + "ch_pump_on": { + "name": "Central Heating Pump On" + }, + "ch_pump_starts": { + "name": "Central Heating Pump Starts" + }, + "co2_value": { + "name": "CO² Value" + }, + "co2_velocity": { + "name": "CO² Velocity" + }, + "co2_ventilation": { + "name": "CO² Ventilation" + }, + "co_valve_position": { + "name": "CO Valve Position" + }, + "comm_space": { + "name": "Comm Space {letter}" + }, + "compr_block": { + "name": "Compressor Block" + }, + "compr_power_on_delay": { + "name": "Compressor Power-On Delay" + }, + "compressed_gas_temp": { + "name": "Compressed Gas Temperature" + }, + "compressor": { + "name": "Compressor" + }, + "compressor_current": { + "name": "Compressor Current (A)" + }, + "compressor_on": { + "name": "Compressor On" + }, + "compressor_start": { + "name": "Compressor Start" + }, + "compressor_starts": { + "name": "Compressor Starts" + }, + "condition": { + "name": "Condition" + }, + "condition_cool": { + "name": "Condition Cool" + }, + "condition_off": { + "name": "Condition Off" + }, + "cooling_temp_control_valve_setpoint": { + "name": "Cooling Temp Control Valve Setpoint" + }, + "correction_measurement_delta_source_temperature": { + "name": "Correction of Delta Source Temperature (K)" + }, + "counter_min_time": { + "name": "Counter Minimum Time" + }, + "counter_stop": { + "name": "Counter Stop" + }, + "counter_time": { + "name": "Counter Time" + }, + "current_bypass_share": { + "name": "Current Bypass Share" + }, "current_consumption_fan": { - "name": "Current Fan Power Consumption" - }, + "name": "Current Fan Power Consumption" + }, + "current_e_element": { + "name": "Current Electrical Element (A)" + }, + "current_period": { + "name": "Current Period" + }, + "current_pos": { + "name": "Current Position" + }, + "current_position": { + "name": "Current Position" + }, + "current_source_valve_position": { + "name": "Current Source Valve Position" + }, + "cv_dhw_or_cooling_temp_valve": { + "name": "CV DHW or Cooling Temp Valve" + }, + "cv_for_naddraai": { + "name": "CV for Afterrun" + }, "cv_pressure": { "name": "CV Pressure" }, + "cv_pump": { + "name": "CV Pump" + }, "cv_pump_percent": { "name": "CV Pump" }, + "cv_pump_prime": { + "name": "CV Pump Prime" + }, "cv_return_temp": { "name": "CV Return Temperature" }, + "cv_start_delay": { + "name": "CV Start Delay" + }, + "cv_stop_delay": { + "name": "CV Stop Delay" + }, + "cv_supply_temp": { + "name": "CV Supply Temperature" + }, + "cycle_counter": { + "name": "Cycle Counter" + }, + "cycle_timer": { + "name": "Cycle Timer" + }, + "deferred_absence": { + "name": "Deferred Absence" + }, + "delay_cv_start": { + "name": "Delay CV Start" + }, + "delay_cv_stop": { + "name": "Delay CV Stop" + }, + "delay_electr": { + "name": "Delay Electrical Element" + }, "desired_capacity": { - "name": "Desired Capacity" - }, + "name": "Desired Capacity" + }, "desired_consumption_fan": { - "name": "Desired Fan Power Consumption" - }, + "name": "Desired Fan Power Consumption" + }, "desired_inlet_temp": { - "name": "Desired Inlet Temperature" - }, + "name": "Desired Inlet Temperature" + }, + "desired_power": { + "name": "Desired Power" + }, + "dhw_element_on": { + "name": "DHW Element On" + }, + "dhw_element_starts": { + "name": "DHW Element Starts" + }, + "dhw_mode": { + "name": "DHW Mode" + }, + "dhw_mode_starts": { + "name": "DHW Mode Starts" + }, + "dhw_pump_on": { + "name": "DHW Pump On" + }, + "dhw_pump_starts": { + "name": "DHW Pump Starts" + }, + "distributor_valve": { + "name": "Distributor {distributor} Valve {valve}" + }, + "drain_actual": { + "name": "Actual Drain Level" + }, "drain_fan_speed": { "name": "Drain Fan Speed" }, - "empty_battery": { - "name": "Empty Battery" + "drain_requested": { + "name": "Requested Drain Level" + }, + "drain_time": { + "name": "Drain Time" + }, + "duration_of_current_frost_setpoint": { + "name": "Duration of Current Frost Setpoint" + }, + "e_consumption_cooling": { + "name": "Energy Consumption (Cooling, kWh)" + }, + "e_consumption_dhw": { + "name": "Energy Consumption (DHW, kWh)" + }, + "e_consumption_during_cooling": { + "name": "Energy During Cooling (kWh)" + }, + "e_consumption_during_dhw": { + "name": "Energy During DHW (kWh)" + }, + "e_consumption_during_heating": { + "name": "Energy During Heating (kWh)" + }, + "e_consumption_during_stand_by": { + "name": "Energy During Standby (kWh)" + }, + "e_consumption_heating": { + "name": "Energy Consumption (Heating, kWh)" + }, + "e_consumption_stand_by": { + "name": "Energy Consumption (Standby, kWh)" + }, + "electrical_element_on": { + "name": "Electrical Element On" + }, + "electrical_element_release": { + "name": "Electrical Element Release" + }, + "electrical_element_starts": { + "name": "Electrical Element Starts" + }, + "elek_block": { + "name": "Electrical Block" + }, + "element": { + "name": "Element" + }, + "energy_out_of_source": { + "name": "Energy Out of Source (MWh)" + }, + "energy_returned_to_source": { + "name": "Energy Returned to Source (MWh)" + }, + "enhanced_bathroom": { + "name": "Enhanced Bathroom Mode" }, "error": { "name": "Error" }, + "error_code_byte": { + "name": "Error Code Byte {num}" + }, "error_number": { - "name": "Error Number" - }, + "name": "Error Number" + }, + "error_retry": { + "name": "Error Retry" + }, + "ev_adjust": { + "name": "Expansion Valve Adjustment" + }, + "ev_pressure_offset": { + "name": "Expansion Valve Pressure Offset" + }, + "evaporator_temp": { + "name": "Evaporator Temperature" + }, + "exhaust_fan_actual": { + "name": "Actual Exhaust Fan" + }, + "expansion_valve": { + "name": "Expansion Valve" + }, + "external_heating_release_time": { + "name": "External Heating Release Time" + }, "extracted_air_temp": { - "name": "Extracted Air Temperature" - }, + "name": "Extracted Air Temperature" + }, + "fallback_speed_timer": { + "name": "Fallback Speed Timer" + }, + "fan_off_during_frost": { + "name": "Fan Off During Frost" + }, "fan_setpoint_rpm": { "name": "Fan Setpoint" }, "fan_speed": { "name": "Fan Speed" }, + "fault_highest_priority": { + "name": "Highest Priority Fault" + }, "filter_use_counter": { "name": "Filter Use Counter" }, "flow_blown_air": { - "name": "Airflow (Blown Out)" - }, + "name": "Airflow (Blown Out)" + }, + "flow_hardware": { + "name": "Flow Hardware" + }, "flow_inflated_air": { - "name": "Airflow (Inflated)" - }, + "name": "Airflow (Inflated)" + }, "flow_sensor": { "name": "Flow" }, + "free_cooling": { + "name": "Free Cooling" + }, + "free_cooling_block_time": { + "name": "Free Cooling Block Time" + }, + "free_cooling_interval": { + "name": "Free Cooling Interval" + }, + "free_cooling_mode": { + "name": "Free Cooling Mode" + }, + "free_cooling_on_time": { + "name": "Free Cooling On Time" + }, + "free_cooling_starts": { + "name": "Free Cooling Starts" + }, + "free_cooling_valve": { + "name": "Free Cooling Valve" + }, + "frost_adjustment_speed": { + "name": "Frost Adjustment Speed" + }, + "frost_block": { + "name": "Frost Block" + }, + "frost_lock": { + "name": "Frost Lock" + }, + "frost_status": { + "name": "Frost Status" + }, + "frost_timer": { + "name": "Frost Timer" + }, + "gateway_time_receive": { + "name": "Gateway Time Receive" + }, + "ghe_switch": { + "name": "GHE Switch" + }, "global_fault_code": { "name": "Global Fault Code" }, "heat_demand": { "name": "Heat Demand Thermostat" }, + "heat_demand_thermost": { + "name": "Heat Demand Thermostat" + }, + "heat_demand_total": { + "name": "Total Heat Demand" + }, + "heat_source": { + "name": "Heat Source" + }, "highest_measured_co2_value": { - "name": "Highest Measured CO2 Level" - }, + "name": "Highest Measured CO² Level" + }, "highest_measured_rh_value": { - "name": "Highest Measured Relative Humidity" - }, + "name": "Highest Measured Relative Humidity" + }, "highest_received_co2_value": { - "name": "Highest Received CO2 Level" + "name": "Highest Received CO² Level" }, "highest_received_rh_value": { "name": "Highest Received Relative Humidity" }, + "hru_blowout_flow": { + "name": "HRU Blowout Flow" + }, + "hru_blowout_temp": { + "name": "HRU Blowout Temperature" + }, "humidity": { "name": "Humidity" }, + "hysteresis_of_the_frost": { + "name": "Frost Hysteresis" + }, + "hysteresis_use_in_control_mode": { + "name": "Hysteresis in Control Mode" + }, + "i_error_sourceflow": { + "name": "I-Error Source Flow" + }, "inlet_temp": { - "name": "Inlet Temperature" - }, + "name": "Inlet Temperature" + }, + "internal_humidity": { + "name": "Internal Humidity" + }, + "internal_temp": { + "name": "Internal Temperature" + }, "last_cmd_command": { "name": "Last Command" }, "last_cmd_source": { "name": "Last Command Source" }, + "latest_valid_source_supply_temp": { + "name": "Latest Valid Source Supply Temperature" + }, + "led_fast": { + "name": "LED Fast" + }, + "led_on": { + "name": "LED On" + }, + "led_slow": { + "name": "LED Slow" + }, + "liquid_temp": { + "name": "Liquid Temperature" + }, + "logging": { + "name": "Logging" + }, + "low_pressure_timer": { + "name": "Low Pressure Timer" + }, + "malfunction_valve_detection_dist": { + "name": "Malfunction Valve Detection Distributor {distributor}" + }, + "manual_control": { + "name": "Manual Control" + }, "mass_flow_air_enter_house_kgh": { - "name": "Mass Flow of Air Entering (kg/h)" - }, + "name": "Mass Flow of Air Entering (kg/h)" + }, "mass_flow_air_leaving_house_kgh": { - "name": "Mass Flow of Air Leaving (kg/h)" - }, + "name": "Mass Flow of Air Leaving (kg/h)" + }, "max_co2_level": { - "name": "Max CO2 Level" + "name": "Max CO² Level" + }, + "max_cv_return_temp": { + "name": "Max CV Return Temperature" + }, + "max_frost_vent_speed": { + "name": "Maximum Frost Ventilation Speed" }, "max_rh_level": { "name": "Max RH Level" }, + "maximum_time_for_preheating_potable_water": { + "name": "Maximum Time for Preheating Potable Water" + }, "measured_blend_temp_heated": { - "name": "Measured Blend Temperature (Heated)" - }, + "name": "Measured Blend Temperature (Heated)" + }, "measured_waste_temp_heated": { - "name": "Measured Waste Temperature (Heated)" - }, + "name": "Measured Waste Temperature (Heated)" + }, + "measurement_actual": { + "name": "Actual Measurement" + }, + "measurement_previous_first": { + "name": "Previous Measurement 1" + }, + "measurement_previous_second": { + "name": "Previous Measurement 2" + }, + "min_running_time_compr": { + "name": "Minimum Running Time for Compressor" + }, + "minimum_release_time_external_cooling": { + "name": "Minimum Release Time for External Cooling" + }, + "minimum_time_for_preheating_potable_water": { + "name": "Minimum Time for Preheating Potable Water" + }, "mixed_outside_air_temp": { - "name": "Mixed Outside Air Temperature" - }, + "name": "Mixed Outside Air Temperature" + }, "mode": { "name": "Mode" }, "motor_speed": { - "name": "Motor Speed" - }, + "name": "Motor Speed" + }, + "new_level_time": { + "name": "New Level Time" + }, + "next_rfspeed_absolute": { + "name": "Next RF Speed" + }, + "next_rfspeed_level": { + "name": "Next RF Speed Level" + }, + "number_of_bypass_settings": { + "name": "Number of Bypass Settings" + }, + "number_of_hours_of_too_cold_air": { + "name": "Hours of Too Cold Air" + }, + "number_of_steps_the_frost_valve_is_open": { + "name": "Steps Frost Valve is Open" + }, + "outdoor_temp": { + "name": "Outdoor Temperature" + }, "outside_temp": { "name": "Outside Temperature" }, + "p_source_flow_error": { + "name": "P-Source Flow Error" + }, + "particulars": { + "name": "Particulars" + }, + "period_timer": { + "name": "Period Timer" + }, + "periodic_bypass_valve_travel": { + "name": "Periodic Bypass Valve Travel" + }, + "phase_detection": { + "name": "Phase Detection" + }, + "pi_error_sourceflow": { + "name": "PI-Error Source Flow" + }, + "pir_fan_speed_level": { + "name": "PIR Fan Speed Level" + }, + "position_of_frost_valve": { + "name": "Position of Frost Valve" + }, "power_kw": { "name": "Power (kW)" }, "power_perc": { "name": "Power (%)" }, + "preheat_tap_water": { + "name": "Preheat Tap Water" + }, + "presence_timer": { + "name": "Presence Timer" + }, + "pressure_switch": { + "name": "Pressure Switch" + }, + "pulse_counter": { + "name": "Pulse Counter" + }, "relative_fanspeed": { - "name": "Relative Fan Speed" - }, + "name": "Relative Fan Speed" + }, + "relative_humidity": { + "name": "Relative Humidity" + }, "remaining_override_timer": { "name": "Remaining Override Timer" }, "remote": { "name": "Remote - {remote_name}" }, + "requested_fanspeed": { + "name": "Requested Fan Speed" + }, "requested_room_temp": { - "name": "Requested Toom Temperature" + "name": "Requested Room Temperature" + }, + "requested_speed": { + "name": "Requested Speed" + }, + "reserve": { + "name": "Reserve" + }, + "rest_cycle_time": { + "name": "Rest Cycle Time" + }, + "rest_vent_time": { + "name": "Rest Vent Time" + }, + "rfspeed_absolute": { + "name": "RF Speed" }, "room_temp": { "name": "Room Temperature" @@ -198,21 +819,123 @@ "room_temp_setpoint": { "name": "Room Temperature Setpoint" }, + "sample_timer": { + "name": "Sample Timer" + }, + "sample_timer_in_frost_mode": { + "name": "Sample Timer in Frost Mode" + }, + "selected_mode": { + "name": "Selected Mode" + }, + "selection": { + "name": "Selection" + }, + "sensor_fault": { + "name": "Sensor Fault" + }, "setpoint_temp": { "name": "Setpoint Temperature" }, + "slow_start_well_pump": { + "name": "Slow Start Well Pump" + }, + "source_flow_control_period": { + "name": "Source Flow Control Period" + }, + "source_flow_glycol_compensation": { + "name": "Source Flow Glycol Compensation" + }, + "source_for_nadraai": { + "name": "Source for Afterrun" + }, + "source_pump_flow_setpoint": { + "name": "Source Pump Flow Setpoint" + }, + "source_pump_on": { + "name": "Source Pump On" + }, + "source_pump_speed_at_free_cooling": { + "name": "Source Pump Speed at Free Cooling" + }, + "source_pump_speed_free_cooling_mode": { + "name": "Source Pump Speed in Free Cooling Mode" + }, + "source_pump_starts": { + "name": "Source Pump Starts" + }, + "source_return_temperature_too_low": { + "name": "Source Return Temperature Too Low" + }, + "spare_input": { + "name": "Spare Input" + }, "speed_setpoint": { "name": "Speed Setpoint" }, + "speed_timer": { + "name": "Speed Timer" + }, + "stabilisation_waiting_time_free_cooling": { + "name": "Stabilisation Waiting Time for Free Cooling" + }, + "start_up_counter": { + "name": "Start-Up Counter" + }, "state": { "name": "State" }, + "state_cool": { + "name": "State Cool" + }, + "state_hand": { + "name": "State Hand" + }, + "state_hand2": { + "name": "State Hand" + }, + "state_heating": { + "name": "State Heating" + }, "status": { "name": "Status" }, + "sub_status": { + "name": "Sub Status" + }, + "suction_gas_temp": { + "name": "Suction Gas Temperature" + }, + "summer_counter": { + "name": "Summer Counter" + }, + "summer_day": { + "name": "Summer Day" + }, + "summerday_k_min": { + "name": "Summer Day" + }, + "supply_actual": { + "name": "Actual Supply" + }, + "supply_fan_actual": { + "name": "Actual Supply Fan" + }, "supply_fan_speed": { "name": "Supply Fan Speed" }, + "supply_requested": { + "name": "Requested Supply" + }, + "system_starts": { + "name": "System Starts" + }, + "tariff": { + "name": "Tariff" + }, + "tariff_low_from_thermostat": { + "name": "Low Tariff from Thermostat" + }, "temp": { "name": "Temperature" }, @@ -222,17 +945,155 @@ "temp_to_source": { "name": "Temperature to Source" }, + "temperature": { + "name": "Temperature" + }, + "temporary_speed_reduction": { + "name": "Temporary Speed Reduction" + }, "thermostat": { "name": "Thermostat" }, + "time_active_zone_too_cold": { + "name": "Time Active Zone Too Cold" + }, + "time_co_valve_start_position": { + "name": "Time CO Valve Start Position" + }, + "time_for_error_history": { + "name": "Time for Error History" + }, + "time_hours": { + "name": "Time (Hours)" + }, + "time_minutes": { + "name": "Time (Minutes)" + }, + "time_seconds": { + "name": "Time (Seconds)" + }, + "time_valid": { + "name": "Time Valid" + }, + "timer_for_how_long_the_house_is_cooled": { + "name": "Cooling Duration" + }, + "timer_for_how_long_the_house_is_heated": { + "name": "Heating Duration" + }, "total_operation_time": { "name": "Total Operating Time" }, + "total_runtime": { + "name": "Total Runtime" + }, + "trickle_heating": { + "name": "Trickle Heating" + }, + "utc_time": { + "name": "UTC Time" + }, + "utc_time_offset": { + "name": "UTC Time Offset" + }, + "v_valve": { + "name": "Valve {valve}" + }, + "valve": { + "name": "Valve" + }, + "valve_failure_detection_distributor_1": { + "name": "Valve Failure Detection Distributor 1" + }, + "valve_failure_distributor": { + "name": "Valve Failure Distributor {valve}" + }, + "ventilation_level": { + "name": "Ventilation Level" + }, + "ventilation_mode": { + "name": "Ventilation Mode" + }, + "ventilation_override": { + "name": "Ventilation Override" + }, + "ventilation_request": { + "name": "Ventilation Request" + }, + "ventilation_setpoint": { + "name": "Ventilation Setpoint" + }, "ventilation_setpoint_percentage": { "name": "Ventilation Setpoint" }, + "ventilation_status": { + "name": "Ventilation Status" + }, + "venting_active": { + "name": "Venting Active" + }, + "venting_duration": { + "name": "Venting Duration" + }, + "venting_end_time": { + "name": "Venting End Time" + }, + "venting_start_time": { + "name": "Venting Start Time" + }, + "venting_status": { + "name": "Venting Status" + }, + "vkk_switch": { + "name": "VKK Switch" + }, + "waiting_time_permanently_released_element": { + "name": "Waiting Time for Permanently Released Element" + }, + "water_heater_mode": { + "name": "Water Heater Mode" + }, + "water_heater_setpoint": { + "name": "Water Heater Setpoint" + }, + "water_heater_status": { + "name": "Water Heater Status" + }, + "water_pressure": { + "name": "Water Pressure" + }, + "water_temp": { + "name": "Water Temperature" + }, + "water_temp_setpoint": { + "name": "Water Temperature Setpoint" + }, + "water_temp_status": { + "name": "Water Temperature Status" + }, + "well_pump": { + "name": "Well Pump" + }, "well_pump_percent": { "name": "Well Pump" + }, + "well_pump_prime": { + "name": "Well Pump Prime" + }, + "well_pump_speed_at_airreg": { + "name": "Well Pump Speed at Air Regulation" + }, + "well_pump_speed_at_compr": { + "name": "Well Pump Speed at Compressor" + }, + "zone_demand": { + "name": "Zone Demand" + }, + "zone_mode": { + "name": "Zone Mode" + }, + "zone_temp": { + "name": "Zone Temperature" } } }, diff --git a/custom_components/ithodaalderop/translations/nl.json b/custom_components/ithodaalderop/translations/nl.json index 0b736a5..f91805a 100644 --- a/custom_components/ithodaalderop/translations/nl.json +++ b/custom_components/ithodaalderop/translations/nl.json @@ -1,17 +1,122 @@ { "entity": { "binary_sensor": { + "bleeding_mode_blocked": { + "name": "Ontluchtingsmodus Geblokkeerd" + }, + "blockage": { + "name": "Blokkade" + }, + "boiler_blocked_from_thermostat": { + "name": "Boiler Geblokkeerd door Thermostaat" + }, + "boiler_boost_from_thermostat": { + "name": "Boiler Boost van Thermostaat" + }, + "boiler_mode_active": { + "name": "Boilermodus Actief" + }, + "boiler_mode_blocked": { + "name": "Boilermodus Geblokkeerd" + }, "bypass_position": { "name": "Bypass Positie" }, + "comfort_selected_on_thermostat": { + "name": "Comfortmodus Geselecteerd op Thermostaat" + }, + "compressor_blocked": { + "name": "Compressor Geblokkeerd" + }, + "compressor_in_boiler_mode": { + "name": "Compressor in Boilermodus" + }, + "compressor_in_cv_mode": { + "name": "Compressor in CV Modus" + }, + "condensation_protection": { + "name": "Condensatiebescherming" + }, + "cv_enabled": { + "name": "CV Modus Ingeschakeld" + }, + "cv_mode_active": { + "name": "CV Modus Actief" + }, + "cv_mode_blocked": { + "name": "CV Modus Geblokkeerd" + }, + "eco_selected_on_thermostat": { + "name": "Eco Modus Geselecteerd op Thermostaat" + }, + "electr_element_blocked": { + "name": "Elektrisch Element Geblokkeerd" + }, + "electr_element_dhw_blocked": { + "name": "Elektrisch Element voor Tapwater Geblokkeerd" + }, + "element_blocked_during_retry": { + "name": "Element Geblokkeerd Tijdens Herstart" + }, + "element_in_boiler_mode": { + "name": "Element in Boilermodus" + }, + "element_in_cv_mode": { + "name": "Element in CV Modus" + }, + "element_released": { + "name": "Element Vrijgegeven" + }, + "empty_battery": { + "name": "Battery Leeg" + }, + "error_found": { + "name": "Fout Gevonden" + }, "filter_dirty": { "name": "Filter Vuil" + }, + "free_cooling_enabled": { + "name": "Vrije Koeling Ingeschakeld" + }, + "free_cooling_mode_active": { + "name": "Vrije Koeling Modus Actief" + }, + "free_cooling_mode_blocked": { + "name": "Vrije Koeling Modus Geblokkeerd" + }, + "manual_operation": { + "name": "Handmatige Bediening" + }, + "ot_time_valid": { + "name": "OT Tijd Geldig" + }, + "off_mode_active": { + "name": "Uit-Modus Actief" + }, + "regeneration_active": { + "name": "Regeneratie Actief" + }, + "task_active": { + "name": "Taak Actief" + }, + "utc_time_valid": { + "name": "UTC Tijd Geldig" + }, + "valve_position": { + "name": "Klep Positie" + }, + "venting_from_thermostat": { + "name": "Ventilatie van Thermostaat" } }, "sensor": { + "absence": { + "name": "Afwezigheid" + }, "absolute_fanspeed": { - "name": "Absolute Ventilatorsnelheid" - }, + "name": "Absolute Ventilatorsnelheid" + }, "actual_exhaust_fan": { "name": "Actuele Afvoer Ventilator" }, @@ -33,6 +138,18 @@ "actual_temp": { "name": "Actuele Temperatuur" }, + "adaptive_fifo_index": { + "name": "Adaptieve FIFO Index" + }, + "adaptive_overheat": { + "name": "Adaptieve Oververhitting" + }, + "adaptive_timer": { + "name": "Adaptieve Timer" + }, + "additional_cooling_release": { + "name": "Extra Koeling Vrijgegeven" + }, "air_discharge_temp": { "name": "Luchtafvoertemperatuur" }, @@ -48,171 +165,777 @@ "balance": { "name": "Balans" }, + "block_time_pre_heating_tap_water": { + "name": "Blokkeertijd voor Voorverwarmen Kraanwater" + }, + "block_time_release_external_cooling": { + "name": "Blokkeertijd voor Vrijgeven Externe Koeling" + }, + "block_timer_bypass": { + "name": "Blokkeer Timer voor Bypass" + }, + "blocking_time_trickle_low_after_cv_operation": { + "name": "Blokkeertijd Lage Drupstand na CV-bediening" + }, + "blocking_time_trickle_low_after_power_up": { + "name": "Blokkeertijd Lage Drupstand na Opstarten" + }, "blown_out_air_temp": { - "name": "Uitgeblazen Luchttemperatuur" - }, + "name": "Uitgeblazen Luchttemperatuur" + }, + "boiler_for_nadraai": { + "name": "Boiler voor Naloop" + }, + "boiler_pump": { + "name": "Boiler Pomp" + }, "boiler_pump_percent": { "name": "Boiler Pomp" }, + "boiler_temp_down": { + "name": "Boilertemperatuur Verlaging" + }, "boiler_temp_up": { "name": "Boiler Temperatuur" }, + "boiler_timer": { + "name": "Boiler Timer" + }, + "busy_doing_adjustments": { + "name": "Bezig met Aanpassingen" + }, + "bypass_mode": { + "name": "Bypass Modus" + }, + "bypass_position": { + "name": "Bypass Positie" + }, + "bypass_setpoint": { + "name": "Bypass Instelpunt" + }, "bypass_valve_open": { - "name": "Bypassklep Open" - }, + "name": "Bypassklep Open" + }, + "calculated_condensation_temp_dhw": { + "name": "Berekende Condensatietemperatuur (Tapwater)" + }, + "calculated_cv_condensation_temp": { + "name": "Berekende CV Condensatietemperatuur" + }, + "calculated_evaporation_temp_cv": { + "name": "Berekende Verdampingstemperatuur (CV)" + }, + "calculated_evaporation_temp_dhw": { + "name": "Berekende Verdampingstemperatuur (Tapwater)" + }, + "ch_mode": { + "name": "Centrale Verwarmingsmodus" + }, + "ch_mode_starts": { + "name": "Centrale Verwarmingsmodus Start" + }, + "ch_pump_on": { + "name": "CV Pomp Aan" + }, + "ch_pump_starts": { + "name": "CV Pomp Start" + }, + "co2_value": { + "name": "CO² Waarde" + }, + "co2_velocity": { + "name": "CO² Veranderingssnelheid" + }, + "co2_ventilation": { + "name": "CO² Ventilatie" + }, + "co_valve_position": { + "name": "CO Kleppositie" + }, + "comm_space": { + "name": "Comm Space {letter}" + }, + "compr_block": { + "name": "Compressor Blokkade" + }, + "compr_power_on_delay": { + "name": "Compressor Inschakelvertraging" + }, + "compressed_gas_temp": { + "name": "Gecomprimeerde Gastemperatuur" + }, + "compressor": { + "name": "Compressor" + }, + "compressor_current": { + "name": "Compressor Stroom" + }, + "compressor_on": { + "name": "Compressor Aan" + }, + "compressor_start": { + "name": "Compressor Start" + }, + "compressor_starts": { + "name": "Compressor Starts" + }, + "condition": { + "name": "Conditie" + }, + "condition_cool": { + "name": "Conditie Koel" + }, + "condition_off": { + "name": "Conditie Uit" + }, + "cooling_temp_control_valve_setpoint": { + "name": "Instelpunt Koelkleptemperatuur" + }, + "correction_measurement_delta_source_temperature": { + "name": "Correctie Delta Bron Temperatuur (K)" + }, + "counter_min_time": { + "name": "Teller Minimale Tijd" + }, + "counter_stop": { + "name": "Stop Teller" + }, + "counter_time": { + "name": "Tijd Teller" + }, + "current_bypass_share": { + "name": "Huidige Bypass Aandeel" + }, "current_consumption_fan": { - "name": "Huidig Energieverbruik Ventilator" - }, + "name": "Huidig Energieverbruik Ventilator" + }, + "current_e_element": { + "name": "Huidige Elektrische Element (A)" + }, + "current_period": { + "name": "Huidige Periode" + }, + "current_pos": { + "name": "Huidige Positie" + }, + "current_position": { + "name": "Huidige Positie" + }, + "current_source_valve_position": { + "name": "Huidige Bronkleppositie" + }, + "cv_dhw_or_cooling_temp_valve": { + "name": "CV Tapwater of Koeling Temperatuurklep" + }, + "cv_for_naddraai": { + "name": "CV voor Naloop" + }, "cv_pressure": { "name": "CV Druk" }, + "cv_pump": { + "name": "CV Pomp" + }, "cv_pump_percent": { "name": "CV Pomp" }, + "cv_pump_prime": { + "name": "CV Pomp Priming" + }, "cv_return_temp": { "name": "CV Afvoer Temperatuur" }, + "cv_start_delay": { + "name": "CV Startvertraging" + }, + "cv_stop_delay": { + "name": "CV Stopvertraging" + }, + "cv_supply_temp": { + "name": "CV Aanvoertemperatuur" + }, + "cycle_counter": { + "name": "Cyclusteller" + }, + "cycle_timer": { + "name": "Cyclustimer" + }, + "deferred_absence": { + "name": "Uitgestelde Afwezigheid" + }, + "delay_cv_start": { + "name": "Vertraging CV Start" + }, + "delay_cv_stop": { + "name": "Vertraging CV Stop" + }, + "delay_electr": { + "name": "Vertraging Elektrisch Element" + }, "desired_capacity": { - "name": "Gewenste Capaciteit" - }, + "name": "Gewenste Capaciteit" + }, "desired_consumption_fan": { - "name": "Gewenst Energieverbruik Ventilator" - }, + "name": "Gewenst Energieverbruik Ventilator" + }, "desired_inlet_temp": { - "name": "Gewenste Inlaattemperatuur" - }, + "name": "Gewenste Inlaattemperatuur" + }, + "desired_power": { + "name": "Gewenst Vermogen" + }, + "dhw_element_on": { + "name": "Tapwater Element Aan" + }, + "dhw_element_starts": { + "name": "Tapwater Element Start" + }, + "dhw_mode": { + "name": "Tapwater Modus" + }, + "dhw_mode_starts": { + "name": "Tapwater Modus Start" + }, + "dhw_pump_on": { + "name": "Tapwater Pomp Aan" + }, + "dhw_pump_starts": { + "name": "Tapwater Pomp Start" + }, + "distributor_valve": { + "name": "Distributeur {distributor} Klep {valve}" + }, + "drain_actual": { + "name": "Werkelijke Afvoerniveau" + }, "drain_fan_speed": { "name": "Afvoerventilator Snelheid" }, - "empty_battery": { - "name": "Battery Leeg" + "drain_requested": { + "name": "Gewenst Afvoerniveau" + }, + "drain_time": { + "name": "Afdruiptijd" + }, + "duration_of_current_frost_setpoint": { + "name": "Duur van Huidig Vorst Instelpunt" + }, + "e_consumption_cooling": { + "name": "Energieverbruik (Koeling, kWh)" + }, + "e_consumption_dhw": { + "name": "Energieverbruik (Tapwater, kWh)" + }, + "e_consumption_during_cooling": { + "name": "Energieverbruik Tijdens Koeling (kWh)" + }, + "e_consumption_during_dhw": { + "name": "Energieverbruik Tijdens Tapwater (kWh)" + }, + "e_consumption_during_heating": { + "name": "Energieverbruik Tijdens Verwarming (kWh)" + }, + "e_consumption_during_stand_by": { + "name": "Energieverbruik Tijdens Stand-by (kWh)" + }, + "e_consumption_heating": { + "name": "Energieverbruik (Verwarming, kWh)" + }, + "e_consumption_stand_by": { + "name": "Energieverbruik (Stand-by, kWh)" + }, + "electrical_element_on": { + "name": "Elektrisch Element Aan" + }, + "electrical_element_release": { + "name": "Elektrisch Element Vrijgegeven" + }, + "electrical_element_starts": { + "name": "Elektrisch Element Start" + }, + "elek_block": { + "name": "Elektrische Blokkade" + }, + "element": { + "name": "Element" + }, + "energy_out_of_source": { + "name": "Energie Uit Bron (MWh)" + }, + "energy_returned_to_source": { + "name": "Energie Terug naar Bron (MWh)" + }, + "enhanced_bathroom": { + "name": "Verbeterde Badkamer Modus" }, "error": { "name": "Fout" }, + "error_code_byte": { + "name": "Foutcode Byte {num}" + }, "error_number": { - "name": "Foutnummer" - }, + "name": "Foutnummer" + }, + "error_retry": { + "name": "Fout Herstart" + }, + "ev_adjust": { + "name": "Expansieklep Aanpassing" + }, + "ev_pressure_offset": { + "name": "Expansieklep Druk Offset" + }, + "evaporator_temp": { + "name": "Verdampertemperatuur" + }, + "exhaust_fan_actual": { + "name": "Actuele Afvoer Ventilator" + }, + "expansion_valve": { + "name": "Expansieklep" + }, + "external_heating_release_time": { + "name": "Vrijgavetijd Externe Verwarming" + }, "extracted_air_temp": { - "name": "Afgevoerd Luchttemperatuur" - }, + "name": "Afgevoerd Luchttemperatuur" + }, + "fallback_speed_timer": { + "name": "Fallback Snelheid Timer" + }, + "fan_off_during_frost": { + "name": "Ventilator Uit Tijdens Vorst" + }, "fan_setpoint_rpm": { "name": "Ventilator Stand" }, "fan_speed": { "name": "Ventilator Snelheid" }, + "fault_highest_priority": { + "name": "Fout met Hoogste Prioriteit" + }, "filter_use_counter": { "name": "Filter gebruiksteller" }, "flow_blown_air": { - "name": "Luchtstroom (Uitgeblazen)" - }, + "name": "Luchtstroom (Uitgeblazen)" + }, + "flow_hardware": { + "name": "Stroomhardware" + }, "flow_inflated_air": { - "name": "Luchtstroom (Ingeblazen)" - }, + "name": "Luchtstroom (Ingeblazen)" + }, "flow_sensor": { "name": "Stroomsnelheid" }, + "free_cooling": { + "name": "Vrije Koeling" + }, + "free_cooling_block_time": { + "name": "Blokkeertijd Vrije Koeling" + }, + "free_cooling_interval": { + "name": "Vrije Koeling Interval" + }, + "free_cooling_mode": { + "name": "Vrije Koeling Modus" + }, + "free_cooling_on_time": { + "name": "Vrije Koeling Aan Tijd" + }, + "free_cooling_starts": { + "name": "Vrije Koeling Start" + }, + "free_cooling_valve": { + "name": "Vrije Koeling Klep" + }, + "frost_adjustment_speed": { + "name": "Vorst Aanpassingssnelheid" + }, + "frost_block": { + "name": "Vorstbeveiliging" + }, + "frost_lock": { + "name": "Vorstvergrendeling" + }, + "frost_status": { + "name": "Vorststatus" + }, + "frost_timer": { + "name": "Vorst Timer" + }, + "gateway_time_receive": { + "name": "Gateway Tijd Ontvangen" + }, + "ghe_switch": { + "name": "GHE Schakelaar" + }, "global_fault_code": { "name": "Globale Fout Code" }, "heat_demand": { "name": "Warmtevraag Thermostaat" }, + "heat_demand_thermost": { + "name": "Warmtevraag Thermostaat" + }, + "heat_demand_total": { + "name": "Totale Warmtevraag" + }, + "heat_source": { + "name": "Warmtebron" + }, "highest_measured_co2_value": { - "name": "Hoogst Gemeten CO2-niveau" - }, + "name": "Hoogst Gemeten CO²-niveau" + }, "highest_measured_rh_value": { - "name": "Hoogst Gemeten Relatieve Vochtigheid" - }, + "name": "Hoogst Gemeten Relatieve Vochtigheid" + }, "highest_received_co2_value": { - "name": "Hoogste CO2-niveau" + "name": "Hoogste CO²-niveau" }, "highest_received_rh_value": { - "name": "Hoogste Relatieve Vochtigheid" + "name": "Hoogste Relatieve Luchtvochtigheid" + }, + "hru_blowout_flow": { + "name": "HRU Uitblaasstroom" + }, + "hru_blowout_temp": { + "name": "HRU Uitblaastemperatuur" }, "humidity": { "name": "Luchtvochtigheid" }, + "hysteresis_of_the_frost": { + "name": "Vorst Hysteresis" + }, + "hysteresis_use_in_control_mode": { + "name": "Hysteresis in Regelmodus" + }, + "i_error_sourceflow": { + "name": "I-Fout Bronstroom" + }, "inlet_temp": { - "name": "Inlaattemperatuur" - }, + "name": "Inlaattemperatuur" + }, + "internal_humidity": { + "name": "Interne Luchtvochtigheid" + }, + "internal_temp": { + "name": "Interne Temperatuur" + }, "last_cmd_command": { "name": "Laatste Commando" }, "last_cmd_source": { "name": "Laatste Commando Bron" }, + "latest_valid_source_supply_temp": { + "name": "Laatste Geldige Bronaanvoertemperatuur" + }, + "led_fast": { + "name": "LED Snel" + }, + "led_on": { + "name": "LED Aan" + }, + "led_slow": { + "name": "LED Langzaam" + }, + "liquid_temp": { + "name": "Vloeistoftemperatuur" + }, + "logging": { + "name": "Logboek" + }, + "low_pressure_timer": { + "name": "Lagedruk Timer" + }, + "malfunction_valve_detection_dist": { + "name": "Storing klepdetectie verdeler {distributor}" + }, + "manual_control": { + "name": "Handmatige Bediening" + }, "mass_flow_air_enter_house_kgh": { - "name": "Luchtmassastroom In (kg/u)" - }, + "name": "Luchtmassastroom In (kg/u)" + }, "mass_flow_air_leaving_house_kgh": { - "name": "Luchtmassastroom Uit (kg/u)" - }, + "name": "Luchtmassastroom Uit (kg/u)" + }, "max_co2_level": { - "name": "Max CO2 Niveau" + "name": "Max CO² Niveau" + }, + "max_cv_return_temp": { + "name": "Maximale CV Retourtemperatuur" + }, + "max_frost_vent_speed": { + "name": "Maximale Vorstventilatiesnelheid" }, "max_rh_level": { "name": "Max RH Niveau" }, + "maximum_time_for_preheating_potable_water": { + "name": "Maximale Tijd voor Voorverwarming Drinkwater" + }, "measured_blend_temp_heated": { - "name": "Gemeten Mengtemperatuur (Verwarmd)" - }, + "name": "Gemeten Mengtemperatuur (Verwarmd)" + }, "measured_waste_temp_heated": { - "name": "Gemeten Afvaltemperatuur (Verwarmd)" - }, + "name": "Gemeten Afvaltemperatuur (Verwarmd)" + }, + "measurement_actual": { + "name": "Huidige Meting" + }, + "measurement_previous_first": { + "name": "Vorige Meting 1" + }, + "measurement_previous_second": { + "name": "Vorige Meting 2" + }, + "min_running_time_compr": { + "name": "Minimale Looptijd Compressor" + }, + "minimum_release_time_external_cooling": { + "name": "Minimale Vrijgavetijd Externe Koeling" + }, + "minimum_time_for_preheating_potable_water": { + "name": "Minimale Tijd voor Voorverwarming Drinkwater" + }, "mixed_outside_air_temp": { - "name": "Gemengde Buitenluchttemperatuur" - }, + "name": "Gemengde Buitenluchttemperatuur" + }, "mode": { "name": "Mode" }, "motor_speed": { - "name": "Motorsnelheid" - }, + "name": "Motorsnelheid" + }, + "new_level_time": { + "name": "Tijd Nieuw Niveau" + }, + "next_rfspeed_absolute": { + "name": "Volgende RF Snelheid" + }, + "next_rfspeed_level": { + "name": "Volgende RF Snelheidsniveau" + }, + "number_of_bypass_settings": { + "name": "Aantal Bypass Instellingen" + }, + "number_of_hours_of_too_cold_air": { + "name": "Uren van Te Koude Lucht" + }, + "number_of_steps_the_frost_valve_is_open": { + "name": "Stappen Dat Vorstklep Open Is" + }, + "outdoor_temp": { + "name": "Buitentemperatuur" + }, "outside_temp": { "name": "Buitentemperatuur" }, + "p_source_flow_error": { + "name": "P-Bronstroomfout" + }, + "particulars": { + "name": "Bijzonderheden" + }, + "period_timer": { + "name": "Periode Timer" + }, + "periodic_bypass_valve_travel": { + "name": "Periodieke Bypassklepbeweging" + }, + "phase_detection": { + "name": "Fasedetectie" + }, + "pi_error_sourceflow": { + "name": "PI-Fout Bronstroom" + }, + "pir_fan_speed_level": { + "name": "PIR Ventilatorsnelheid Niveau" + }, + "position_of_frost_valve": { + "name": "Positie van Vorstklep" + }, "power_kw": { "name": "Vermogen (kW)" }, "power_perc": { "name": "Vermogen (%)" }, + "preheat_tap_water": { + "name": "Voorverwarmen Kraanwater" + }, + "presence_timer": { + "name": "Aanwezigheidstimer" + }, + "pressure_switch": { + "name": "Drukschakelaar" + }, + "pulse_counter": { + "name": "Pulsenteller" + }, "relative_fanspeed": { - "name": "Relatieve Ventilatorsnelheid" - }, + "name": "Relatieve Ventilatorsnelheid" + }, + "relative_humidity": { + "name": "Relatieve Luchtvochtigheid" + }, "remaining_override_timer": { "name": "Resterende Override Timer" }, "remote": { "name": "Afstandsbediening - {remote_name}" }, + "requested_fanspeed": { + "name": "Gevraagde Ventilatorsnelheid" + }, "requested_room_temp": { "name": "Gevraagde Kamertemperatuur" }, + "requested_speed": { + "name": "Gevraagde Snelheid" + }, + "reserve": { + "name": "Reserve" + }, + "rest_cycle_time": { + "name": "Rustcyclustijd" + }, + "rest_vent_time": { + "name": "Rustventilatietijd" + }, + "rfspeed_absolute": { + "name": "RF Snelheid" + }, "room_temp": { "name": "Kamertemperatuur" }, "room_temp_setpoint": { "name": "Ingestelde Kamertemperatuur" }, + "sample_timer": { + "name": "Sample Timer" + }, + "sample_timer_in_frost_mode": { + "name": "Sample Timer in Vorstmodus" + }, + "selected_mode": { + "name": "Geselecteerde Modus" + }, + "selection": { + "name": "Selectie" + }, + "sensor_fault": { + "name": "Sensorfout" + }, "setpoint_temp": { "name": "Ingestelde temperatuur" }, + "slow_start_well_pump": { + "name": "Langzame Start Putpomp" + }, + "source_flow_control_period": { + "name": "Bronstroom Controleperiode" + }, + "source_flow_glycol_compensation": { + "name": "Bronstroom Glycolcompensatie" + }, + "source_for_nadraai": { + "name": "Bron voor Naloop" + }, + "source_pump_flow_setpoint": { + "name": "Bronpomp Stroominstelpunt" + }, + "source_pump_on": { + "name": "Bronpomp Aan" + }, + "source_pump_speed_at_free_cooling": { + "name": "Bronpompsnelheid bij Vrije Koeling" + }, + "source_pump_speed_free_cooling_mode": { + "name": "Bronpompsnelheid in Vrije Koeling Modus" + }, + "source_pump_starts": { + "name": "Bronpomp Start" + }, + "source_return_temperature_too_low": { + "name": "Bron Retourtemperatuur te Laag" + }, + "spare_input": { + "name": "Reserve Ingang" + }, + "speed_setpoint": { + "name": "Ingestelde Snelheid" + }, + "speed_timer": { + "name": "Snelheid Timer" + }, + "stabilisation_waiting_time_free_cooling": { + "name": "Stabilisatiewachttijd Vrije Koeling" + }, + "start_up_counter": { + "name": "Opstart Teller" + }, "state": { "name": "Status" }, + "state_cool": { + "name": "Status Koeling" + }, + "state_hand": { + "name": "Status Handmatig" + }, + "state_hand2": { + "name": "Status Handmatig" + }, + "state_heating": { + "name": "Status Verwarming" + }, "status": { "name": "Status" }, - "speed_setpoint": { - "name": "Ingestelde Snelheid" + "sub_status": { + "name": "Substatus" + }, + "suction_gas_temp": { + "name": "Aanzuiggastemperatuur" + }, + "summer_counter": { + "name": "Zomerteller" + }, + "summer_day": { + "name": "Zomerdag" + }, + "summerday_k_min": { + "name": "Zomerdag" + }, + "supply_actual": { + "name": "Werkelijke Toevoerniveau" + }, + "supply_fan_actual": { + "name": "Actuele Aanvoer Ventilator" }, "supply_fan_speed": { "name": "Toevoerventilator Snelheid" }, + "supply_requested": { + "name": "Gevraagd Toevoerniveau" + }, + "system_starts": { + "name": "Systeem Starts" + }, + "tariff": { + "name": "Tarief" + }, + "tariff_low_from_thermostat": { + "name": "Laag Tarief van Thermostaat" + }, "temp": { "name": "Temperatuur" }, @@ -222,17 +945,155 @@ "temp_to_source": { "name": "Temperatuur naar bron" }, + "temperature": { + "name": "Temperatuur" + }, + "temporary_speed_reduction": { + "name": "Tijdelijke Snelheidsverlaging" + }, "thermostat": { "name": "Thermostaat boiler" }, + "time_active_zone_too_cold": { + "name": "Tijd Actieve Zone Te Koud" + }, + "time_co_valve_start_position": { + "name": "Tijd CO Klep Startpositie" + }, + "time_for_error_history": { + "name": "Tijd voor Foutgeschiedenis" + }, + "time_hours": { + "name": "Tijd (Uren)" + }, + "time_minutes": { + "name": "Tijd (Minuten)" + }, + "time_seconds": { + "name": "Tijd (Seconden)" + }, + "time_valid": { + "name": "Tijd Geldig" + }, + "timer_for_how_long_the_house_is_cooled": { + "name": "Duur van Koeling" + }, + "timer_for_how_long_the_house_is_heated": { + "name": "Duur van Verwarming" + }, "total_operation_time": { "name": "Totale bedrijfstijd" }, + "total_runtime": { + "name": "Totale Looptijd" + }, + "trickle_heating": { + "name": "Druppelverwarming" + }, + "utc_time": { + "name": "UTC Tijd" + }, + "utc_time_offset": { + "name": "UTC Tijd Offset" + }, + "v_valve": { + "name": "Klep {valve}" + }, + "valve": { + "name": "Klep" + }, + "valve_failure_detection_distributor_1": { + "name": "Klepstoringdetectieverdeler 1" + }, + "valve_failure_distributor": { + "name": "Klepstoring verdeler {valve}" + }, + "ventilation_level": { + "name": "Ventilatieniveau" + }, + "ventilation_mode": { + "name": "Ventilatiemodus" + }, + "ventilation_override": { + "name": "Ventilatie Override" + }, + "ventilation_request": { + "name": "Gevraagd Ventilatieniveau" + }, + "ventilation_setpoint": { + "name": "Ventilatie Instelpunt" + }, "ventilation_setpoint_percentage": { "name": "Insteld Ventilatie Percentage" }, + "ventilation_status": { + "name": "Ventilatiestatus" + }, + "venting_active": { + "name": "Ventilatie Actief" + }, + "venting_duration": { + "name": "Ventilatieduur" + }, + "venting_end_time": { + "name": "Ventilatie Eindtijd" + }, + "venting_start_time": { + "name": "Ventilatie Starttijd" + }, + "venting_status": { + "name": "Ventilatiestatus" + }, + "vkk_switch": { + "name": "VKK Schakelaar" + }, + "waiting_time_permanently_released_element": { + "name": "Wachttijd voor Permanent Vrijgegeven Element" + }, + "water_heater_mode": { + "name": "Waterverwarmer Modus" + }, + "water_heater_setpoint": { + "name": "Waterverwarmer Instelpunt" + }, + "water_heater_status": { + "name": "Waterverwarmer Status" + }, + "water_pressure": { + "name": "Waterdruk" + }, + "water_temp": { + "name": "Watertemperatuur" + }, + "water_temp_setpoint": { + "name": "Watertemperatuur Instelpunt" + }, + "water_temp_status": { + "name": "Watertemperatuur Status" + }, + "well_pump": { + "name": "Bronpomp" + }, "well_pump_percent": { "name": "Bronpomp" + }, + "well_pump_prime": { + "name": "Putpomp Priming" + }, + "well_pump_speed_at_airreg": { + "name": "Putpompsnelheid bij Luchtregeling" + }, + "well_pump_speed_at_compr": { + "name": "Putpompsnelheid bij Compressor" + }, + "zone_demand": { + "name": "Zonevraag" + }, + "zone_mode": { + "name": "Zonemodus" + }, + "zone_temp": { + "name": "Zonetemperatuur" } } }, @@ -252,6 +1113,13 @@ "noncve_model": "Model:" } }, + "reconfigure": { + "title": "Wijzig Itho apparaten", + "description": "Selecteer het apparaat dat u opnieuw wilt configureren. Herhaal de configuratie voor elke fysieke add-on die aanwezig is.", + "data": { + "addontype": "Selecteer het type add-on dat u opnieuw wilt configureren." + } + }, "remotes": { "title": "Voeg nieuwe Itho afstandsbedieningen toe", "description": "Gebruik de namen zoals deze ook zijn geconfigureerd in de Add-on bij RF Devices. Klik op 'Verzenden' zonder iets te wijzigen om dit over te slaan.", @@ -274,9 +1142,9 @@ "remote5": "Afstandsbediening 5" } }, - "rooms_reconfigure": { - "title": "Wijzig Itho ruimtes", - "description": "Benoem de ruimtes gekoppeld aan de Auto temp unit. Bijv. Woonkamer or slaapkamer ouders.", + "rooms": { + "title": "Voeg nieuwe Itho ruimtes toe", + "description": "Benoem de ruimtes gekoppeld aan de Auto temp unit. Bijv. Woonkamer", "data": { "room1": "Ruimte 1", "room2": "Ruimte 2", @@ -288,9 +1156,9 @@ "room8": "Ruimte 8" } }, - "rooms": { - "title": "Voeg nieuwe Itho ruimtes toe", - "description": "Benoem de ruimtes gekoppeld aan de Auto temp unit. Bijv. Woonkamer", + "rooms_reconfigure": { + "title": "Wijzig Itho ruimtes", + "description": "Benoem de ruimtes gekoppeld aan de Auto temp unit. Bijv. Woonkamer or slaapkamer ouders.", "data": { "room1": "Ruimte 1", "room2": "Ruimte 2", @@ -306,8 +1174,7 @@ "abort": { "already_configured": "Itho integratie is al geconfigureerd", "reconfigure_successful": "Herconfiguratie was succesvol" - }, - "error": {} + } }, "selector": { "addonselect": {