Esempio n. 1
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the Verisure platform."""
    if not int(hub.config.get('smartplugs', '1')):
        return False

    hub.update_smartplugs()
    switches = []
    switches.extend([
        VerisureSmartplug(value.id) for value in hub.smartplug_status.values()
    ])
    add_devices(switches)
Esempio n. 2
0
def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the Verisure switch platform."""
    if not int(hub.config.get('smartplugs', '1')):
        return False

    hub.update_smartplugs()
    switches = []
    switches.extend([
        VerisureSmartplug(value.deviceLabel)
        for value in hub.smartplug_status.values()])
    add_devices(switches)
Esempio n. 3
0
 def update(self):
     """Get the latest date of the smartplug."""
     hub.update_smartplugs()
Esempio n. 4
0
 def update(self):
     """Get the latest date of the smartplug."""
     hub.update_smartplugs()
Esempio n. 5
0
 def update(self):
     hub.update_smartplugs()
Esempio n. 6
0
 def update(self):
     hub.update_smartplugs()