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
|
@ -98,6 +98,7 @@ class ThermostatEntity(ClimateEntity):
|
|||
_attr_min_temp = MIN_TEMP
|
||||
_attr_max_temp = MAX_TEMP
|
||||
_attr_has_entity_name = True
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(self, device: Device) -> None:
|
||||
"""Initialize ThermostatEntity."""
|
||||
|
@ -105,11 +106,6 @@ class ThermostatEntity(ClimateEntity):
|
|||
self._device_info = NestDeviceInfo(device)
|
||||
self._attr_supported_features = 0
|
||||
|
||||
@property
|
||||
def should_poll(self) -> bool:
|
||||
"""Disable polling since entities have state pushed via pubsub."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str | None:
|
||||
"""Return a unique ID."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue