Add common Thermostat module (#977)

This commit is contained in:
Steven B.
2024-11-26 09:37:15 +00:00
committed by GitHub
parent cb4e28394d
commit 3dfada7575
10 changed files with 208 additions and 14 deletions

View File

@@ -24,6 +24,7 @@ from .modules import (
DeviceModule,
Firmware,
Light,
Thermostat,
Time,
)
from .smartmodule import SmartModule
@@ -361,6 +362,11 @@ class SmartDevice(Device):
or Module.ColorTemperature in self._modules
):
self._modules[Light.__name__] = Light(self, "light")
if (
Module.TemperatureControl in self._modules
and Module.TemperatureSensor in self._modules
):
self._modules[Thermostat.__name__] = Thermostat(self, "thermostat")
async def _initialize_features(self) -> None:
"""Initialize device features."""