Skip to content

Commit

Permalink
Add all HRU 350 entities
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-dcs committed Dec 16, 2024
1 parent 87016a2 commit 32c7499
Show file tree
Hide file tree
Showing 5 changed files with 301 additions and 12 deletions.
3 changes: 1 addition & 2 deletions custom_components/ithodaalderop/def_hru200.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Definitions for Itho 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,
Expand All @@ -11,7 +10,7 @@
UnitOfTime,
)

from .definitions import IthoBinarySensorEntityDescription, IthoSensorEntityDescription
from .definitions import IthoSensorEntityDescription

HRUECO200SENSORS: tuple[IthoSensorEntityDescription, ...] = (
IthoSensorEntityDescription(
Expand Down
117 changes: 108 additions & 9 deletions custom_components/ithodaalderop/def_hru350.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,63 @@
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
),
IthoSensorEntityDescription(
json_field="Boiler timer",
translation_key="boiler_timer",
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
),
IthoSensorEntityDescription(
json_field="Current position",
translation_key="current_position",
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
),
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 fan actual (RPM)",
translation_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)",
translation_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)",
translation_key="fallback_speed_timer",
native_unit_of_measurement=UnitOfTime.SECONDS,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Frost block",
translation_key="frost_block",
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Frost timer",
translation_key="frost_timer",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="GHEswitch",
translation_key="gheswitch",
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Global fault code",
translation_key="global_fault_code",
Expand All @@ -84,6 +128,13 @@
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Outdoor temp (°C)",
translation_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)",
translation_key="remaining_override_timer",
Expand All @@ -92,28 +143,76 @@
entity_category=EntityCategory.DIAGNOSTIC,
icon="mdi:timer-outline",
),
IthoSensorEntityDescription(
json_field="Requested fanspeed (%)",
translation_key="requested_fanspeed",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Pir fan speed level",
translation_key="pir_fan_speed_level",
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Room temp (°C)",
translation_key="room_temp",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Status",
translation_key="status",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Summercounter",
translation_key="summercounter",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="Summerday (K_min)",
translation_key="summerday_k_min",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
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 fan actual (RPM)",
translation_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)",
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,
IthoSensorEntityDescription(
json_field="Valve position",
translation_key="valve_position",
entity_category=EntityCategory.DIAGNOSTIC,
icon_off="mdi:valve-closed",
icon_on="mdi:valve-open",
entity_registry_enabled_default=False,
),
IthoSensorEntityDescription(
json_field="VKKswitch",
translation_key="vkkswitch",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
)
107 changes: 107 additions & 0 deletions custom_components/ithodaalderop/def_wpu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
"""Definitions for Itho sensors added to MQTT."""

from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
from homeassistant.const import (
PERCENTAGE,
EntityCategory,
UnitOfPressure,
UnitOfTemperature,
)

from .definitions import IthoSensorEntityDescription

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,
),
)
44 changes: 43 additions & 1 deletion custom_components/ithodaalderop/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@
"boiler_temp_up": {
"name": "Boiler Temp Up"
},
"boiler_timer": {
"name": "Boiler Timer"
},
"bypass_valve_open": {
"name": "Bypass Valve Open"
},
"current_consumption_fan": {
"name": "Current Fan Power Consumption"
},
"current_position": {
"name": "Current Position"
},
"cv_pressure": {
"name": "CV Pressure"
},
Expand Down Expand Up @@ -93,9 +99,15 @@
"error_number": {
"name": "Error Number"
},
"exhaust_fan_actual": {
"name": "Actual Exhaust Fan"
},
"extracted_air_temp": {
"name": "Extracted Air Temperature"
},
"fallback_speed_timer": {
"name": "Fallback Speed Timer"
},
"fan_setpoint_rpm": {
"name": "Fan Setpoint"
},
Expand All @@ -114,6 +126,15 @@
"flow_sensor": {
"name": "Flow"
},
"frost_block": {
"name": "Frost Block"
},
"frost_timer": {
"name": "Frost Timer"
},
"gheswitch": {
"name": "GHE Switch"
},
"global_fault_code": {
"name": "Global Fault Code"
},
Expand Down Expand Up @@ -174,6 +195,9 @@
"outside_temp": {
"name": "Outside Temperature"
},
"pir_fan_speed_level": {
"name": "PIR Fan Speed Level"
},
"power_kw": {
"name": "Power (kW)"
},
Expand All @@ -189,8 +213,11 @@
"remote": {
"name": "Remote - {remote_name}"
},
"requested_fanspeed": {
"name": "Requested Fan Speed"
},
"requested_room_temp": {
"name": "Requested Toom Temperature"
"name": "Requested Room Temperature"
},
"room_temp": {
"name": "Room Temperature"
Expand All @@ -210,6 +237,15 @@
"status": {
"name": "Status"
},
"supply_fan_actual": {
"name": "Actual Supply Fan"
},
"summercounter": {
"name": "Summer Counter"
},
"summerday_k_min": {
"name": "Summer Day"
},
"supply_fan_speed": {
"name": "Supply Fan Speed"
},
Expand All @@ -228,6 +264,12 @@
"total_operation_time": {
"name": "Total Operating Time"
},
"valve_position": {
"name": "Valve Position"
},
"vkkswitch": {
"name": "VKK Switch"
},
"ventilation_setpoint_percentage": {
"name": "Ventilation Setpoint"
},
Expand Down
Loading

0 comments on commit 32c7499

Please sign in to comment.