Add None-check for VeSync fan device.state.display_status (#153055)
parent
eb84020773
commit
0ff88fd366
|
@ -141,7 +141,9 @@ class VeSyncFanHA(VeSyncBaseEntity, FanEntity):
|
|||
attr["active_time"] = self.device.state.active_time
|
||||
|
||||
if hasattr(self.device.state, "display_status"):
|
||||
attr["display_status"] = self.device.state.display_status.value
|
||||
attr["display_status"] = getattr(
|
||||
self.device.state.display_status, "value", None
|
||||
)
|
||||
|
||||
if hasattr(self.device.state, "child_lock"):
|
||||
attr["child_lock"] = self.device.state.child_lock
|
||||
|
|
Loading…
Reference in New Issue