dc8147c46db586c491b7a11b55ceae17647c2606,homeassistant/components/switch/vera.py,,get_devices,#Any#Any#,67
Before Change
device_data_str = config.get("device_data")
device_data = None
if device_data_str:
try:
device_data = json.loads(device_data_str)
except Exception as json_ex:
_LOGGER.error("Vera switch error parsing device info, should be in the format [{"id" : 12, "name": "Lounge Light"}]: %s", json_ex)
vera_controller = veraApi.VeraController(base_url)
devices = vera_controller.get_devices(["Switch", "Armable Sensor"])
vera_switches = []
After Change
vera_switches = []
for device in devices:
extra_data = get_extra_device_data(device_data, device.deviceId)
exclude = False
if extra_data:
exclude = extra_data.get("exclude", False)
if exclude is not True:
vera_switches.append(VeraSwitch(device, extra_data))
except Exception as inst:
_LOGGER.error("Could not find Vera switches: %s", inst)
return False
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: home-assistant/home-assistant
Commit Name: dc8147c46db586c491b7a11b55ceae17647c2606
Time: 2015-03-08
Author: jamespcole@gmail.com
File Name: homeassistant/components/switch/vera.py
Class Name:
Method Name: get_devices
Project Name: home-assistant/home-assistant
Commit Name: dc8147c46db586c491b7a11b55ceae17647c2606
Time: 2015-03-08
Author: jamespcole@gmail.com
File Name: homeassistant/components/switch/vera.py
Class Name:
Method Name: get_devices
Project Name: home-assistant/home-assistant
Commit Name: dc8147c46db586c491b7a11b55ceae17647c2606
Time: 2015-03-08
Author: jamespcole@gmail.com
File Name: homeassistant/components/sensor/vera.py
Class Name:
Method Name: get_devices
Project Name: home-assistant/home-assistant
Commit Name: dc8147c46db586c491b7a11b55ceae17647c2606
Time: 2015-03-08
Author: jamespcole@gmail.com
File Name: homeassistant/components/light/vera.py
Class Name:
Method Name: setup_platform