mirror of
https://github.com/home-assistant/core.git
synced 2026-05-19 23:35:20 +02:00
Add None-check for VeSync fan device.state.display_status (#153055)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user