zha: Don't poll switch devices (#14560)

pull/14563/head
David F. Mulcahey 2018-05-20 19:00:51 -04:00 committed by Russell Cloran
parent c8ad9c4daa
commit 4395217031
1 changed files with 5 additions and 0 deletions

View File

@ -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."""