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
|
@ -37,6 +37,8 @@ async def async_setup_entry(
|
|||
class KonnectedBinarySensor(BinarySensorEntity):
|
||||
"""Representation of a Konnected binary sensor."""
|
||||
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(self, device_id, zone_num, data):
|
||||
"""Initialize the Konnected binary sensor."""
|
||||
self._data = data
|
||||
|
@ -62,11 +64,6 @@ class KonnectedBinarySensor(BinarySensorEntity):
|
|||
"""Return the state of the sensor."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the device class."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue