Use _attr_should_poll in components [a-g] (#77268)

This commit is contained in:
epenet 2022-08-26 10:15:33 +02:00 committed by GitHub
parent 120c76524d
commit a46c25d2c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 37 additions and 95 deletions

View file

@ -165,6 +165,8 @@ async def async_setup_platform(
class GenericThermostat(ClimateEntity, RestoreEntity):
"""Representation of a Generic Thermostat device."""
_attr_should_poll = False
def __init__(
self,
name,
@ -300,11 +302,6 @@ class GenericThermostat(ClimateEntity, RestoreEntity):
if not self._hvac_mode:
self._hvac_mode = HVACMode.OFF
@property
def should_poll(self):
"""Return the polling state."""
return False
@property
def name(self):
"""Return the name of the thermostat."""