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
|
@ -27,6 +27,8 @@ async def async_setup_entry(
|
|||
class ResponseSwitch(SwitchEntity):
|
||||
"""Representation of an FireServiceRota switch."""
|
||||
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(self, coordinator, client, entry):
|
||||
"""Initialize."""
|
||||
self._coordinator = coordinator
|
||||
|
@ -63,11 +65,6 @@ class ResponseSwitch(SwitchEntity):
|
|||
"""Return the unique ID for this switch."""
|
||||
return self._unique_id
|
||||
|
||||
@property
|
||||
def should_poll(self) -> bool:
|
||||
"""No polling needed."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return if switch is available."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue