Skip to content

Commit

Permalink
Added module type SENSE control
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjen Bos authored and Arjen Bos committed Oct 27, 2023
1 parent 82a6d8b commit 128b2da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion custom_components/alpha_innotec/base_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion custom_components/alpha_innotec/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,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
]

0 comments on commit 128b2da

Please sign in to comment.