Use _attr_should_poll in components [j-n] (#77357)

This commit is contained in:
epenet 2022-08-26 21:19:37 +02:00 committed by GitHub
parent b36321988f
commit dff9baf880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 41 additions and 114 deletions

View file

@ -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."""