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
|
@ -87,6 +87,8 @@ def setup_platform(
|
|||
class NX584ZoneSensor(BinarySensorEntity):
|
||||
"""Representation of a NX584 zone as a sensor."""
|
||||
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(self, zone, zone_type):
|
||||
"""Initialize the nx594 binary sensor."""
|
||||
self._zone = zone
|
||||
|
@ -97,11 +99,6 @@ class NX584ZoneSensor(BinarySensorEntity):
|
|||
"""Return the class of this sensor, from DEVICE_CLASSES."""
|
||||
return self._zone_type
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of the binary sensor."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue