From bbc5c3a3007284e149b995a74ed4ad4e48d39e75 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Mon, 13 Feb 2017 11:23:28 +0100 Subject: [PATCH] Fix mysensors platforms version requirement (#5942) * Notify and device tracker platforms require mysensors version 2.0 or greater. --- homeassistant/components/device_tracker/mysensors.py | 2 ++ homeassistant/components/notify/mysensors.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/homeassistant/components/device_tracker/mysensors.py b/homeassistant/components/device_tracker/mysensors.py index 2ba19924089..5bbbee89be3 100644 --- a/homeassistant/components/device_tracker/mysensors.py +++ b/homeassistant/components/device_tracker/mysensors.py @@ -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 diff --git a/homeassistant/components/notify/mysensors.py b/homeassistant/components/notify/mysensors.py index ad747a7ae93..a2708a51efd 100644 --- a/homeassistant/components/notify/mysensors.py +++ b/homeassistant/components/notify/mysensors.py @@ -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 = {