Use _attr_should_poll in components [a-g] (#77268)
This commit is contained in:
parent
120c76524d
commit
a46c25d2c8
18 changed files with 37 additions and 95 deletions
|
@ -368,6 +368,8 @@ class EDL21:
|
|||
class EDL21Entity(SensorEntity):
|
||||
"""Entity reading values from EDL21 telegram."""
|
||||
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(self, electricity_id, obis, name, entity_description, telegram):
|
||||
"""Initialize an EDL21Entity."""
|
||||
self._electricity_id = electricity_id
|
||||
|
@ -416,11 +418,6 @@ class EDL21Entity(SensorEntity):
|
|||
if self._async_remove_dispatcher:
|
||||
self._async_remove_dispatcher()
|
||||
|
||||
@property
|
||||
def should_poll(self) -> bool:
|
||||
"""Do not poll."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
"""Return a unique ID."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue