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
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue