Mark ambilight as not available when off (#120155)
This commit is contained in:
parent
56d5e41b28
commit
2ce510357d
1 changed files with 9 additions and 0 deletions
|
@ -379,3 +379,12 @@ class PhilipsTVLightEntity(PhilipsJsEntity, LightEntity):
|
|||
|
||||
self._update_from_coordinator()
|
||||
self.async_write_ha_state()
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return true if entity is available."""
|
||||
if not super().available:
|
||||
return False
|
||||
if not self.coordinator.api.on:
|
||||
return False
|
||||
return self.coordinator.api.powerstate == "On"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue