-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
391a284
commit 87016a2
Showing
10 changed files
with
630 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
"""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 EntityCategory, UnitOfPower, UnitOfTemperature | ||
|
||
from .definitions import IthoBinarySensorEntityDescription, IthoSensorEntityDescription | ||
|
||
AUTOTEMPBINARYSENSORS: tuple[IthoBinarySensorEntityDescription, ...] = ( | ||
IthoBinarySensorEntityDescription( | ||
json_field="Empty battery ( 0=OK )", | ||
translation_key="empty_battery", | ||
device_class=BinarySensorDeviceClass.BATTERY, | ||
entity_category=EntityCategory.DIAGNOSTIC, | ||
), | ||
) | ||
|
||
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, | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
"""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, | ||
PERCENTAGE, | ||
REVOLUTIONS_PER_MINUTE, | ||
EntityCategory, | ||
UnitOfTemperature, | ||
UnitOfTime, | ||
) | ||
|
||
from .definitions import IthoBinarySensorEntityDescription, IthoSensorEntityDescription | ||
|
||
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, | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
"""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, | ||
PERCENTAGE, | ||
REVOLUTIONS_PER_MINUTE, | ||
EntityCategory, | ||
UnitOfTemperature, | ||
UnitOfTime, | ||
) | ||
|
||
from .definitions import IthoBinarySensorEntityDescription, IthoSensorEntityDescription | ||
|
||
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, | ||
), | ||
) |
Oops, something went wrong.