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

@@ -3,24 +3,14 @@
from __future__ import annotations
import logging
from enum import Enum
from ...feature import Feature
from ...interfaces.thermostat import ThermostatState
from ..smartmodule import SmartModule
_LOGGER = logging.getLogger(__name__)
class ThermostatState(Enum):
"""Thermostat state."""
Heating = "heating"
Calibrating = "progress_calibration"
Idle = "idle"
Off = "off"
Unknown = "unknown"
class TemperatureControl(SmartModule):
"""Implementation of temperature module."""
@@ -56,7 +46,6 @@ class TemperatureControl(SmartModule):
category=Feature.Category.Config,
)
)
self._add_feature(
Feature(
self._device,
@@ -69,7 +58,6 @@ class TemperatureControl(SmartModule):
type=Feature.Type.Switch,
)
)
self._add_feature(
Feature(
self._device,