thermostat mode optional
This commit is contained in:
@@ -16,16 +16,16 @@ class ThermostatState(BaseModel):
|
|||||||
Thermostat state model with validation.
|
Thermostat state model with validation.
|
||||||
|
|
||||||
Attributes:
|
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]
|
target: Target temperature in °C [5.0..30.0]
|
||||||
current: Current temperature in °C (optional in SET, required in STATE)
|
current: Current temperature in °C (optional in SET, required in STATE)
|
||||||
battery: Battery level 0-100% (optional)
|
battery: Battery level 0-100% (optional)
|
||||||
window_open: Window open detection (optional)
|
window_open: Window open detection (optional)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
mode: Literal["off", "heat", "auto"] = Field(
|
mode: Literal["off", "heat", "auto"] | None = Field(
|
||||||
...,
|
None,
|
||||||
description="Operating mode of the thermostat"
|
description="Operating mode of the thermostat (optional for SET commands)"
|
||||||
)
|
)
|
||||||
|
|
||||||
target: float | Decimal = Field(
|
target: float | Decimal = Field(
|
||||||
|
|||||||
Reference in New Issue
Block a user