Skip to content

Commit 4bab0b6

Browse files
committed
Improve
1 parent 5649f6a commit 4bab0b6

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

plugwise/models.py

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -400,38 +400,30 @@ class SetpointDict:
400400
Used for temperature_offset, max_dhw_temperature,maximum_boiler_temperature.
401401
"""
402402

403-
lower_bound: float | None = None
404-
resolution: float | None = None
405-
setpoint: float | None = None
406-
upper_bound: float | None = None
407-
408-
def update_from_dict(self, data: dict[str, Any]) -> None:
409-
"""Update this SetpointDict object with data from a dictionary."""
410-
411-
self.lower_bound = process_key(data, "lower_bound")
412-
self.resolution = process_key(data, "resolution")
413-
self.setpoint = process_key(data, "setpoint")
414-
self.upper_bound = process_key(data, "upper_bound")
403+
lower_bound: float
404+
resolution: float
405+
setpoint: float
406+
upper_bound: float
415407

416408

417409
@dataclass(kw_only=True)
418410
class ThermostatDict:
419411
"""Thermostat dict class."""
420412

421-
lower_bound: float | None = None
422-
resolution: float | None = None
423-
upper_bound: float | None = None
424-
setpoint: float | None = None # heat or cool
425-
setpoint_high: float | None = None # heat_cool
426-
setpoint_low: float | None = None # heat_cool
413+
lower_bound: float
414+
resolution: float
415+
upper_bound: float
416+
setpoint: float | None # heat or cool
417+
setpoint_high: float | None # heat_cool
418+
setpoint_low: float | None # heat_cool
427419

428420

429421
@dataclass(kw_only=True)
430422
class ThermostatsDict:
431423
"""Thermostats dict class."""
432424

433-
primary: list[str] | None = None
434-
secondary: list[str] | None = None
425+
primary: list[str]
426+
secondary: list[str]
435427

436428

437429
@dataclass(kw_only=True)

0 commit comments

Comments
 (0)