From fccc213d58bdc4c4fd66348fb4339463e21db5d1 Mon Sep 17 00:00:00 2001 From: veista Date: Wed, 14 Dec 2022 21:31:53 +0200 Subject: [PATCH] Added Temp sensor numbers --- custom_components/nilan/device.py | 2 +- custom_components/nilan/device_map.py | 2 +- custom_components/nilan/sensor.py | 28 +++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/custom_components/nilan/device.py b/custom_components/nilan/device.py index 5d7a087..662c042 100644 --- a/custom_components/nilan/device.py +++ b/custom_components/nilan/device.py @@ -181,7 +181,7 @@ async def get_controller_software_version(self) -> str: self._unit_id, CTS602InputRegisters.bus_version, 1, "input" ) if bus_version is not None: - if int(bus_version.registers[0]) > 7: + if int(bus_version.registers[0]) > 19: if result is not None: for value in result.registers: char1 = chr(value >> 8) diff --git a/custom_components/nilan/device_map.py b/custom_components/nilan/device_map.py index cf4bbf8..e97c591 100644 --- a/custom_components/nilan/device_map.py +++ b/custom_components/nilan/device_map.py @@ -65,7 +65,7 @@ "get_t4_outlet": { "entity_type": "sensor", "min_bus_version": 1, - "supported_devices": (13,), + "supported_devices": (13, 35), }, "get_t5_condenser_temperature": { "entity_type": "sensor", diff --git a/custom_components/nilan/sensor.py b/custom_components/nilan/sensor.py index 5077100..46c4506 100644 --- a/custom_components/nilan/sensor.py +++ b/custom_components/nilan/sensor.py @@ -89,7 +89,7 @@ ATTRIBUTE_TO_SENSORS = { "get_t0_controller_temperature": [ Map( - "Controller Board Temperature", + "Controller Board Temperature (T0)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -100,7 +100,7 @@ ], "get_t1_intake_temperature": [ Map( - "Fresh Air Intake Temperature", + "Fresh Air Intake Temperature (T1)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -111,7 +111,7 @@ ], "get_t2_inlet_temperature": [ Map( - "Supply Air Temperature", + "Supply Air Temperature (T2)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -122,7 +122,7 @@ ], "get_t3_exhaust_temperature": [ Map( - "Return Air Temperature", + "Return Air Temperature (T3)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -133,7 +133,7 @@ ], "get_t4_outlet": [ Map( - "Waste Air Temperature", + "Waste Air Temperature (T4)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -144,7 +144,7 @@ ], "get_t5_condenser_temperature": [ Map( - "Condenser Temperature", + "Condenser Temperature (T5)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -155,7 +155,7 @@ ], "get_t6_evaporator_temperature": [ Map( - "Waste Air Temperature", + "Waste Air Temperature (T6)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -166,7 +166,7 @@ ], "get_t7_inlet_temperature_after_heater": [ Map( - "Supply Air Temperature", + "Supply Air Temperature (T7)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -177,7 +177,7 @@ ], "get_t8_outdoor_temperature": [ Map( - "Fresh Air Intake Temperature", + "Fresh Air Intake Temperature (T8)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -188,7 +188,7 @@ ], "get_t10_external_temperature": [ Map( - "Return Air Temperature", + "Return Air Temperature (T10)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -199,7 +199,7 @@ ], "get_t13_return_temperature": [ Map( - "Return Water Temperature", + "Return Water Temperature (T13)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -210,7 +210,7 @@ ], "get_t14_supply_temperature": [ Map( - "Supply Water Temperature", + "Supply Water Temperature (T14)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -221,7 +221,7 @@ ], "get_t15_user_panel_temperature": [ Map( - "User Panel Temperature", + "User Panel Temperature (T15)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT, @@ -232,7 +232,7 @@ ], "get_t16_sacrificial_anode_temperature": [ Map( - "Anode Temperature", + "Anode Temperature (T16)", TEMP_CELSIUS, SensorDeviceClass.TEMPERATURE, SensorStateClass.MEASUREMENT,