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)
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)
def update(self): """Get the latest date of the smartplug.""" hub.update_smartplugs()
def update(self): """Get the latest date of the smartplug.""" hub.update_smartplugs()
def update(self): hub.update_smartplugs()
def update(self): hub.update_smartplugs()