Пример #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)
Пример #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)
Пример #3
0
 def update(self):
     """Get the latest date of the smartplug."""
     hub.update_smartplugs()
Пример #4
0
 def update(self):
     """Get the latest date of the smartplug."""
     hub.update_smartplugs()
Пример #5
0
 def update(self):
     hub.update_smartplugs()
Пример #6
0
 def update(self):
     hub.update_smartplugs()