Make Vera should_poll static rather than dynamic (#47854)
* Make should_poll static. * Address review comments. * Fix black error.pull/48133/head
parent
24e067782a
commit
b03c97cdd0
|
@ -510,7 +510,7 @@ homeassistant/components/usgs_earthquakes_feed/* @exxamalte
|
|||
homeassistant/components/utility_meter/* @dgomes
|
||||
homeassistant/components/velbus/* @Cereal2nd @brefra
|
||||
homeassistant/components/velux/* @Julius2342
|
||||
homeassistant/components/vera/* @vangorra
|
||||
homeassistant/components/vera/* @pavoni
|
||||
homeassistant/components/verisure/* @frenck
|
||||
homeassistant/components/versasense/* @flamm3blemuff1n
|
||||
homeassistant/components/version/* @fabaff @ludeeus
|
||||
|
|
|
@ -236,7 +236,9 @@ class VeraDevice(Generic[DeviceType], Entity):
|
|||
|
||||
def update(self):
|
||||
"""Force a refresh from the device if the device is unavailable."""
|
||||
if not self.available:
|
||||
refresh_needed = self.vera_device.should_poll or not self.available
|
||||
_LOGGER.debug("%s: update called (refresh=%s)", self._name, refresh_needed)
|
||||
if refresh_needed:
|
||||
self.vera_device.refresh()
|
||||
|
||||
@property
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/vera",
|
||||
"requirements": ["pyvera==0.3.13"],
|
||||
"codeowners": ["@vangorra"]
|
||||
"codeowners": ["@pavoni"]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue