Use voluptuous for mysensors (#2992)

* Add voluptuous config validation for mysensors
* Remove and clean up parts that are not needed for pymysensors 0.7.
This commit is contained in:
Martin Hjelmare 2016-08-27 22:41:21 +02:00 committed by Teagan Glenn
parent 6f1c97b9d3
commit 6acaf25b0d
5 changed files with 68 additions and 57 deletions

View file

@ -55,7 +55,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
pres.S_LOCK: MySensorsSwitch,
pres.S_IR: MySensorsIRSwitch,
}
if float(gateway.version) >= 1.5:
if float(gateway.protocol_version) >= 1.5:
map_sv_types.update({
pres.S_BINARY: [set_req.V_STATUS, set_req.V_LIGHT],
pres.S_SPRINKLER: [set_req.V_STATUS],