mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Mark ambilight as not available when off (#120155)
This commit is contained in:
parent
56d5e41b28
commit
2ce510357d
@ -379,3 +379,12 @@ class PhilipsTVLightEntity(PhilipsJsEntity, LightEntity):
|
|||||||
|
|
||||||
self._update_from_coordinator()
|
self._update_from_coordinator()
|
||||||
self.async_write_ha_state()
|
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…
x
Reference in New Issue
Block a user