Don't run unnecessary methods in executor pool (#14853)
* Don't run unnecessary methods in executor pool * Lint * Lint 2
This commit is contained in:
parent
50321a29b5
commit
90a51160c4
13 changed files with 23 additions and 32 deletions
|
@ -19,8 +19,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
"""Perform the setup for Vera controller devices."""
|
||||
add_devices(
|
||||
VeraBinarySensor(device, hass.data[VERA_CONTROLLER])
|
||||
for device in hass.data[VERA_DEVICES]['binary_sensor'])
|
||||
[VeraBinarySensor(device, hass.data[VERA_CONTROLLER])
|
||||
for device in hass.data[VERA_DEVICES]['binary_sensor']], True)
|
||||
|
||||
|
||||
class VeraBinarySensor(VeraDevice, BinarySensorDevice):
|
||||
|
|
|
@ -54,6 +54,7 @@ class VerisureDoorWindowSensor(BinarySensorDevice):
|
|||
"$.doorWindow.doorWindowDevice[?(@.deviceLabel=='%s')]",
|
||||
self._device_label) is not None
|
||||
|
||||
# pylint: disable=no-self-use
|
||||
def update(self):
|
||||
"""Update the state of the sensor."""
|
||||
hub.update_overview()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue