Add gateway wrapper, fix discovery and callbacks

* Add gateway wrapper by subclassing serial gateway.
* Fix platform setup with discovery service.
* Fix platform callback functions with callback factory.
This commit is contained in:
MartinHjelmare committed 2015-12-31 05:48:23 +01:00
1 parent be25ea4f09
commit 69ed6fe6e7
5 files changed
+244 -216

No files matched your search

+2 -1
View File
@@ -17,7 +17,7 @@ from homeassistant.helpers.entity import ToggleEntity
from homeassistant.const import (
STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID)
from homeassistant.components import (
group, discovery, wink, isy994, verisure, zwave)
group, discovery, wink, isy994, verisure, zwave, mysensors)
DOMAIN = 'switch'
SCAN_INTERVAL = 30
@@ -40,6 +40,7 @@ DISCOVERY_PLATFORMS = {
isy994.DISCOVER_SWITCHES: 'isy994',
verisure.DISCOVER_SWITCHES: 'verisure',
zwave.DISCOVER_SWITCHES: 'zwave',
mysensors.DISCOVER_SWITCHES: 'mysensors',
}
PROP_TO_ATTR = {