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

@ -94,6 +94,8 @@ async def async_setup_entry(
class NWSWeather(WeatherEntity):
"""Representation of a weather condition."""
_attr_should_poll = False
def __init__(self, entry_data, hass_data, mode, units):
"""Initialise the platform with a data instance and station name."""
self.nws = hass_data[NWS_DATA]
@ -133,11 +135,6 @@ class NWSWeather(WeatherEntity):
self.async_write_ha_state()
@property
def should_poll(self) -> bool:
"""Entities do not individually poll."""
return False
@property
def attribution(self):
"""Return the attribution."""