mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
zha: Don't poll switch devices (#14560)
This commit is contained in:
parent
c8ad9c4daa
commit
4395217031
@ -211,6 +211,11 @@ class Switch(zha.Entity, BinarySensorDevice):
|
|||||||
general.LevelControl.cluster_id: self.LevelListener(self),
|
general.LevelControl.cluster_id: self.LevelListener(self),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def should_poll(self) -> bool:
|
||||||
|
"""Let zha handle polling."""
|
||||||
|
return False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self) -> bool:
|
def is_on(self) -> bool:
|
||||||
"""Return true if the binary sensor is on."""
|
"""Return true if the binary sensor is on."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user