diff --git a/homeassistant/components/binary_sensor/zha.py b/homeassistant/components/binary_sensor/zha.py index fbe4d33c44e..5dad9c6de3d 100644 --- a/homeassistant/components/binary_sensor/zha.py +++ b/homeassistant/components/binary_sensor/zha.py @@ -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.""" diff --git a/homeassistant/components/fan/zha.py b/homeassistant/components/fan/zha.py index 4e0c303b767..0f302164689 100644 --- a/homeassistant/components/fan/zha.py +++ b/homeassistant/components/fan/zha.py @@ -151,14 +151,6 @@ class ZhaFan(ZhaEntity, FanEntity): new_value = result.get('fan_mode', None) self._state = VALUE_TO_SPEED.get(new_value, None) - @property - def should_poll(self) -> bool: - """Return True if entity has to be polled for state. - - False if entity pushes its state to HA. - """ - return False - def attribute_updated(self, attribute, value): """Handle attribute update from device.""" attr_name = self.cluster.attributes.get(attribute, [attribute])[0] diff --git a/homeassistant/components/light/zha.py b/homeassistant/components/light/zha.py index 29cd4498949..e6827b1bb9b 100644 --- a/homeassistant/components/light/zha.py +++ b/homeassistant/components/light/zha.py @@ -266,11 +266,3 @@ class Light(ZhaEntity, light.Light): xy_color = (round(result['current_x']/65535, 3), round(result['current_y']/65535, 3)) self._hs_color = color_util.color_xy_to_hs(*xy_color) - - @property - def should_poll(self) -> bool: - """Return True if entity has to be polled for state. - - False if entity pushes its state to HA. - """ - return False diff --git a/homeassistant/components/sensor/zha.py b/homeassistant/components/sensor/zha.py index a3c1f37456a..d87ac623042 100644 --- a/homeassistant/components/sensor/zha.py +++ b/homeassistant/components/sensor/zha.py @@ -117,11 +117,6 @@ class Sensor(ZhaEntity): """Return Sensor's cluster.""" return self._cluster - @property - def should_poll(self) -> bool: - """State gets pushed from device.""" - return False - @property def state(self) -> str: """Return the state of the entity.""" diff --git a/homeassistant/components/switch/zha.py b/homeassistant/components/switch/zha.py index 70e3e055ace..3f91ce767fb 100644 --- a/homeassistant/components/switch/zha.py +++ b/homeassistant/components/switch/zha.py @@ -82,11 +82,6 @@ class Switch(ZhaEntity, SwitchDevice): """Entity's cluster.""" return self._endpoint.on_off - @property - def should_poll(self) -> bool: - """Let zha handle polling.""" - return False - @property def is_on(self) -> bool: """Return if the switch is on based on the statemachine.""" diff --git a/homeassistant/components/zha/entities/entity.py b/homeassistant/components/zha/entities/entity.py index c45bd551377..a3d9292ccbc 100644 --- a/homeassistant/components/zha/entities/entity.py +++ b/homeassistant/components/zha/entities/entity.py @@ -164,6 +164,11 @@ class ZhaEntity(entity.Entity): """Return device specific state attributes.""" return self._device_state_attributes + @property + def should_poll(self) -> bool: + """Let ZHA handle polling.""" + return False + @callback def attribute_updated(self, attribute, value): """Handle an attribute updated on this cluster."""