Add None-check for VeSync fan device.state.display_status (#153055)

pull/153062/head
SapuSeven 2025-09-26 21:57:01 +02:00 committed by GitHub
parent eb84020773
commit 0ff88fd366
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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