From 59f5f10aecc0e19ce46cdf5d2df4812bdd88c278 Mon Sep 17 00:00:00 2001 From: Nicolas Hilberg Date: Mon, 2 Sep 2024 15:47:51 +0200 Subject: [PATCH] make all env sensor attributes optional (#89) Co-authored-by: Nicolas Hilberg --- src/dirigera/devices/environment_sensor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dirigera/devices/environment_sensor.py b/src/dirigera/devices/environment_sensor.py index 546629c..c1d1068 100644 --- a/src/dirigera/devices/environment_sensor.py +++ b/src/dirigera/devices/environment_sensor.py @@ -5,12 +5,12 @@ class EnvironmentSensorAttributes(Attributes): - current_temperature: float - current_r_h: int - current_p_m25: Optional[int] - max_measured_p_m25: Optional[int] - min_measured_p_m25: Optional[int] - voc_index: Optional[int] + current_temperature: Optional[float] = None + current_r_h: Optional[int] = None + current_p_m25: Optional[int] = None + max_measured_p_m25: Optional[int] = None + min_measured_p_m25: Optional[int] = None + voc_index: Optional[int] = None class EnvironmentSensor(Device):