32166fd56ae076634316dc7a6c60c067f86f7604,homeassistant/components/light/insteon_plm.py,,async_setup_platform,#Any#Any#Any#Any#,23
Before Change
Set up the Insteon PLM device.
plm = hass.data["insteon_plm"]
device_list = []
for device in discovery_info:
name = device.get("address")
address = device.get("address_hex")
dimmable = bool("dimmable" in device.get("capabilities"))
_LOGGER.info("Registered %s with light platform", name)
device_list.append(
InsteonPLMDimmerDevice(hass, plm, address, name, dimmable)
)
async_add_devices(device_list)
class InsteonPLMDimmerDevice(Light):
A Class for an Insteon device.
After Change
new_entity = InsteonPLMDimmerDevice(device, state_key)
async_add_devices([new_entity])
class InsteonPLMDimmerDevice(InsteonPLMEntity, Light):
A Class for an Insteon device.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
Instances Project Name: home-assistant/home-assistant
Commit Name: 32166fd56ae076634316dc7a6c60c067f86f7604
Time: 2018-02-25
Author: tharris@harrisnj.net
File Name: homeassistant/components/light/insteon_plm.py
Class Name:
Method Name: async_setup_platform
Project Name: home-assistant/home-assistant
Commit Name: 32166fd56ae076634316dc7a6c60c067f86f7604
Time: 2018-02-25
Author: tharris@harrisnj.net
File Name: homeassistant/components/binary_sensor/insteon_plm.py
Class Name:
Method Name: async_setup_platform
Project Name: home-assistant/home-assistant
Commit Name: 32166fd56ae076634316dc7a6c60c067f86f7604
Time: 2018-02-25
Author: tharris@harrisnj.net
File Name: homeassistant/components/switch/insteon_plm.py
Class Name:
Method Name: async_setup_platform
Project Name: home-assistant/home-assistant
Commit Name: 32166fd56ae076634316dc7a6c60c067f86f7604
Time: 2018-02-25
Author: tharris@harrisnj.net
File Name: homeassistant/components/light/insteon_plm.py
Class Name:
Method Name: async_setup_platform