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:
Paulus Schoutsen authored and GitHub committed 2018-06-07 15:31:21 -04:00
1 parent 50321a29b5
commit 90a51160c4
13 files changed
+23 -32

No files matched your search

+2 -2
View File
@@ -25,8 +25,8 @@ SCAN_INTERVAL = timedelta(seconds=5)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the Vera controller devices."""
add_devices(
VeraSensor(device, hass.data[VERA_CONTROLLER])
for device in hass.data[VERA_DEVICES]['sensor'])
[VeraSensor(device, hass.data[VERA_CONTROLLER])
for device in hass.data[VERA_DEVICES]['sensor']], True)
class VeraSensor(VeraDevice, Entity):
@@ -74,6 +74,7 @@ class VerisureThermometer(Entity):
"""Return the unit of measurement of this entity."""
return TEMP_CELSIUS
# pylint: disable=no-self-use
def update(self):
"""Update the sensor."""
hub.update_overview()
@@ -112,6 +113,7 @@ class VerisureHygrometer(Entity):
"""Return the unit of measurement of this entity."""
return '%'
# pylint: disable=no-self-use
def update(self):
"""Update the sensor."""
hub.update_overview()
@@ -150,6 +152,7 @@ class VerisureMouseDetection(Entity):
"""Return the unit of measurement of this entity."""
return 'Mice'
# pylint: disable=no-self-use
def update(self):
"""Update the sensor."""
hub.update_overview()