From 3edb38fd22e88dd28b9891e6f9b4f61aa25d53da Mon Sep 17 00:00:00 2001 From: Arjen Bos <1064589+arjenbos@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:38:13 +0100 Subject: [PATCH] Added sense control, again --- custom_components/alpha_innotec/base_coordinator.py | 5 ++++- custom_components/alpha_innotec/const.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/custom_components/alpha_innotec/base_coordinator.py b/custom_components/alpha_innotec/base_coordinator.py index f93dc8a..88b2d28 100644 --- a/custom_components/alpha_innotec/base_coordinator.py +++ b/custom_components/alpha_innotec/base_coordinator.py @@ -6,7 +6,7 @@ from homeassistant.core import HomeAssistant from . import GatewayAPI -from .const import MODULE_TYPE_SENSOR +from .const import MODULE_TYPE_SENSOR, MODULE_TYPE_SENSE_CONTROL from .controller_api import ControllerAPI from .structs.Thermostat import Thermostat @@ -42,6 +42,9 @@ async def get_thermostats(hass: HomeAssistant, gateway_api: GatewayAPI, controll if module_details["type"] == MODULE_TYPE_SENSOR: current_temperature = module_details["currentTemperature"] battery_percentage = module_details["battery"] + elif module_details["type"] == MODULE_TYPE_SENSE_CONTROL: + current_temperature = module_details["currentTemperature"] + battery_percentage = module_details["battery"] thermostat = Thermostat( identifier=room_id, diff --git a/custom_components/alpha_innotec/const.py b/custom_components/alpha_innotec/const.py index 1641551..4c5a17d 100644 --- a/custom_components/alpha_innotec/const.py +++ b/custom_components/alpha_innotec/const.py @@ -12,8 +12,10 @@ MODULE_TYPE_FLOOR = "floor" MODULE_TYPE_SENSOR = "sensor" +MODULE_TYPE_SENSE_CONTROL = "sense_control" MODULE_TYPES = [ MODULE_TYPE_FLOOR, - MODULE_TYPE_SENSOR + MODULE_TYPE_SENSOR, + MODULE_TYPE_SENSE_CONTROL ]