Code cleanup of velux scene (#12390)

* Code cleanup of velux scene

* fixed review comments

* fixed review comments
This commit is contained in:
Julius Mittenzwei 2018-02-14 15:00:45 +01:00 committed by Martin Hjelmare
parent 6f043f3c5c
commit f25d56d666
2 changed files with 11 additions and 25 deletions

View file

@ -52,16 +52,13 @@ class VeluxModule:
def __init__(self, hass, config):
"""Initialize for velux component."""
from pyvlx import PyVLX
self.initialized = False
host = config[DOMAIN].get(CONF_HOST)
password = config[DOMAIN].get(CONF_PASSWORD)
self.pyvlx = PyVLX(
host=host,
password=password)
self.hass = hass
@asyncio.coroutine
def async_start(self):
"""Start velux component."""
yield from self.pyvlx.load_scenes()
self.initialized = True