Make ZHA entities non-polled by default (#19536)
This commit is contained in:
parent
2a2af80309
commit
01fc322488
6 changed files with 5 additions and 41 deletions
|
@ -121,11 +121,6 @@ class IasZoneSensor(RestoreEntity, ZhaEntity, BinarySensorDevice):
|
|||
from zigpy.zcl.clusters.security import IasZone
|
||||
self._ias_zone_cluster = self._in_clusters[IasZone.cluster_id]
|
||||
|
||||
@property
|
||||
def should_poll(self) -> bool:
|
||||
"""Let zha handle polling."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
"""Return True if entity is on."""
|
||||
|
@ -261,11 +256,6 @@ class Remote(RestoreEntity, ZhaEntity, BinarySensorDevice):
|
|||
cluster = out_clusters[cluster_id]
|
||||
self._zcl_reporting[cluster] = {0: REPORT_CONFIG_IMMEDIATE}
|
||||
|
||||
@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."""
|
||||
|
@ -359,11 +349,6 @@ class BinarySensor(RestoreEntity, ZhaEntity, BinarySensorDevice):
|
|||
_LOGGER.debug("%s restoring old state: %s", self.entity_id, old_state)
|
||||
self._state = old_state.state == STATE_ON
|
||||
|
||||
@property
|
||||
def should_poll(self) -> bool:
|
||||
"""Let zha handle polling."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def cluster(self):
|
||||
"""Zigbee cluster for this entity."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue