Use _attr_should_poll in components [h-i] (#77270)
This commit is contained in:
parent
a46c25d2c8
commit
2a8109304f
20 changed files with 38 additions and 120 deletions
|
@ -199,6 +199,8 @@ class HikvisionData:
|
|||
class HikvisionBinarySensor(BinarySensorEntity):
|
||||
"""Representation of a Hikvision binary sensor."""
|
||||
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(self, hass, sensor, channel, cam, delay):
|
||||
"""Initialize the binary_sensor."""
|
||||
self._hass = hass
|
||||
|
@ -255,11 +257,6 @@ class HikvisionBinarySensor(BinarySensorEntity):
|
|||
# Sensor must be unknown to us, add as generic
|
||||
return None
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue