Use _attr_should_poll in components [j-n] (#77357)

This commit is contained in:
epenet 2022-08-26 21:19:37 +02:00 committed by GitHub
parent b36321988f
commit dff9baf880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 41 additions and 114 deletions

View file

@ -34,6 +34,8 @@ def setup_platform(
class KiraReceiver(SensorEntity):
"""Implementation of a Kira Receiver."""
_attr_should_poll = False
def __init__(self, name, kira):
"""Initialize the sensor."""
self._name = name
@ -69,11 +71,6 @@ class KiraReceiver(SensorEntity):
"""Return the state attributes of the device."""
return {CONF_DEVICE: self._device}
@property
def should_poll(self) -> bool:
"""Entity should not be polled."""
return False
@property
def force_update(self) -> bool:
"""Kira should force updates. Repeated states have meaning."""