Use _attr_should_poll in components [j-n] (#77357)
This commit is contained in:
parent
b36321988f
commit
dff9baf880
23 changed files with 41 additions and 114 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue