From 05a810620db5789eb19cad63c278878cdec98db3 Mon Sep 17 00:00:00 2001 From: Krisjanis Lejejs Date: Mon, 12 Jun 2023 21:06:31 +0300 Subject: [PATCH] Update API, add buffer tank temperature sensor --- custom_components/thermia/manifest.json | 2 +- custom_components/thermia/sensor.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/custom_components/thermia/manifest.json b/custom_components/thermia/manifest.json index 3db00aa..12a8ef6 100644 --- a/custom_components/thermia/manifest.json +++ b/custom_components/thermia/manifest.json @@ -11,7 +11,7 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/klejejs/ha-thermia-heat-pump-integration/issues", "requirements": [ - "ThermiaOnlineAPI==3.17.0" + "ThermiaOnlineAPI==3.18.0" ], "version": "1.0" } diff --git a/custom_components/thermia/sensor.py b/custom_components/thermia/sensor.py index b46342f..cb6bea3 100644 --- a/custom_components/thermia/sensor.py +++ b/custom_components/thermia/sensor.py @@ -220,6 +220,22 @@ async def async_setup_entry( ) ) + if heat_pump.buffer_tank_temperature is not None: + hass_thermia_sensors.append( + ThermiaGenericSensor( + coordinator, + idx, + "is_online", + "Buffer Tank Temperature", + MDI_TEMPERATURE_ICON, + EntityCategory.DIAGNOSTIC, + "temperature", + "measurement", + "buffer_tank_temperature", + TEMP_CELSIUS, + ) + ) + ########################################################################### # Operational status data ###########################################################################