File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -68,15 +68,27 @@ async def refresh(self):
68
68
if "brightness" in attributes :
69
69
self .brightness = int (attributes ["brightness" ])
70
70
else :
71
- self .brightness = 0
71
+ self .brightness = NotImplemented
72
72
if "child_lock" in attributes :
73
73
self .child_lock = attributes ["child_lock" ] == "1"
74
+ else :
75
+ self .child_lock = NotImplemented
74
76
if "night_mode" in attributes :
75
77
self .night_mode = attributes ["night_mode" ] == "1"
76
- self .fan_speed = int (attributes ["fan_speed" ])
78
+ else :
79
+ self .night_mode = NotImplemented
80
+ if "fan_speed" in attributes :
81
+ self .fan_speed = int (attributes ["fan_speed" ])
82
+ else :
83
+ self .fan_speed = NotImplemented
77
84
if "filter_status" in attributes :
78
85
self .filter_expired = attributes ["filter_status" ] != "OK"
79
- self .fan_mode = attributes ["mode" ]
86
+ else :
87
+ self .filter_expired = NotImplemented
88
+ if "mode" in attributes :
89
+ self .fan_mode = attributes ["mode" ]
90
+ else :
91
+ self .fan_mode = NotImplemented
80
92
if "wifi_status" in attributes :
81
93
self .wifi_working = attributes ["wifi_status" ] == "1"
82
94
else :
You can’t perform that action at this time.
0 commit comments