Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sense control, again #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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
]