zha: Don't poll switch devices (#14560)
parent
c8ad9c4daa
commit
4395217031
|
@ -211,6 +211,11 @@ class Switch(zha.Entity, BinarySensorDevice):
|
|||
general.LevelControl.cluster_id: self.LevelListener(self),
|
||||
}
|
||||
|
||||
@property
|
||||
def should_poll(self) -> bool:
|
||||
"""Let zha handle polling."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
"""Return true if the binary sensor is on."""
|
||||
|
|
Loading…
Reference in New Issue