Allow toggles (switches) state to be None (#64621)
This commit is contained in:
parent
01fbc4257b
commit
176f03d4ac
14 changed files with 45 additions and 32 deletions
|
@ -144,7 +144,7 @@ class EsphomeLight(EsphomeEntity[LightInfo, LightState], LightEntity):
|
|||
return self._api_version >= APIVersion(1, 6)
|
||||
|
||||
@esphome_state_property
|
||||
def is_on(self) -> bool | None: # type: ignore[override]
|
||||
def is_on(self) -> bool | None:
|
||||
"""Return true if the light is on."""
|
||||
return self._state.state
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue