thermostat mode optional

This commit is contained in:
2025-11-10 16:54:09 +01:00
parent 1bd175c912
commit e8cd34f88f

View File

@@ -16,16 +16,16 @@ class ThermostatState(BaseModel):
Thermostat state model with validation.
Attributes:
mode: Operating mode (off, heat, auto)
mode: Operating mode (off, heat, auto) - optional for SET commands
target: Target temperature in °C [5.0..30.0]
current: Current temperature in °C (optional in SET, required in STATE)
battery: Battery level 0-100% (optional)
window_open: Window open detection (optional)
"""
mode: Literal["off", "heat", "auto"] = Field(
...,
description="Operating mode of the thermostat"
mode: Literal["off", "heat", "auto"] | None = Field(
None,
description="Operating mode of the thermostat (optional for SET commands)"
)
target: float | Decimal = Field(