Fix mysensors platforms version requirement (#5942)

* Notify and device tracker platforms require mysensors version 2.0 or
  greater.
pull/6009/head
Martin Hjelmare 2017-02-13 11:23:28 +01:00 committed by Paulus Schoutsen
parent 04f3fe0ba3
commit bbc5c3a300
2 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,8 @@ def setup_scanner(hass, config, see, discovery_info=None):
gateways = hass.data.get(mysensors.MYSENSORS_GATEWAYS)
for gateway in gateways:
if float(gateway.protocol_version) < 2.0:
continue
gateway.platform_callbacks.append(mysensors_callback)
return True

View File

@ -19,6 +19,8 @@ def get_service(hass, config, discovery_info=None):
return
for gateway in gateways:
if float(gateway.protocol_version) < 2.0:
continue
pres = gateway.const.Presentation
set_req = gateway.const.SetReq
map_sv_types = {