Merge pull request #999 from MartinHjelmare/fix-not-adding-devices
Fix adding devices on the fly
This commit is contained in:
commit
b13e48bd71
3 files changed
+14
-20
No files matched your search
@@ -7,7 +7,6 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.mysensors.html
|
||||
"""
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
@@ -54,7 +53,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
])
|
||||
v_types.extend([gateway.const.SetReq.V_STATUS, ])
|
||||
|
||||
devices = defaultdict(list)
|
||||
devices = {}
|
||||
gateway.platform_callbacks.append(mysensors.pf_callback_factory(
|
||||
s_types, v_types, devices, add_devices, MySensorsSwitch))
|
||||
|
||||
|
||||
Reference in new issue
Block a user