Skip to content

Commit 66c17e2

Browse files
SapuSevenfrenck
authored andcommitted
Add None-check for VeSync fan device.state.display_status (home-assistant#153055)
1 parent 723902e commit 66c17e2

File tree

1 file changed

+3
-1
lines changed
  • homeassistant/components/vesync

1 file changed

+3
-1
lines changed

homeassistant/components/vesync/fan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def extra_state_attributes(self) -> dict[str, Any]:
141141
attr["active_time"] = self.device.state.active_time
142142

143143
if hasattr(self.device.state, "display_status"):
144-
attr["display_status"] = self.device.state.display_status.value
144+
attr["display_status"] = getattr(
145+
self.device.state.display_status, "value", None
146+
)
145147

146148
if hasattr(self.device.state, "child_lock"):
147149
attr["child_lock"] = self.device.state.child_lock

0 commit comments

Comments
 (0)