From c9d6a1b94c3de7c1667d9c5348948a0f6333ceda Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Sun, 4 Jun 2017 22:20:14 +0200 Subject: [PATCH 1/4] Revert "Update to dsmr_parser supporting v5 arguments." This reverts commit 3567de4b90361c262c4d3261325c2b7dbfa5441f. --- homeassistant/components/sensor/dsmr.py | 6 +++++- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sensor/dsmr.py b/homeassistant/components/sensor/dsmr.py index 8df4776459e7ef..0d1dfa99485000 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -40,7 +40,11 @@ _LOGGER = logging.getLogger(__name__) -REQUIREMENTS = ['dsmr_parser==0.9'] +# REQUIREMENTS = ['dsmr_parser==0.9'] +# using dev branch until released upstream +# https://github.com/ndokter/dsmr_parser/pull/23 +REQUIREMENTS = ['https://github.com/aequitas/dsmr_parser/archive/dsmr5.zip' + '#dsmr_parser==0.9'] CONF_DSMR_VERSION = 'dsmr_version' diff --git a/requirements_all.txt b/requirements_all.txt index 2aa8d9c2f2f92c..61a30ae21367e7 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -162,7 +162,7 @@ dnspython3==1.15.0 dovado==0.4.1 # homeassistant.components.sensor.dsmr -dsmr_parser==0.9 +dsmr_parser==0.8 # homeassistant.components.dweet # homeassistant.components.sensor.dweet diff --git a/requirements_test_all.txt b/requirements_test_all.txt index f56ab8c31947fe..ded0c66122655c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -37,7 +37,7 @@ aiohttp_cors==0.5.3 apns2==0.1.1 # homeassistant.components.sensor.dsmr -dsmr_parser==0.9 +dsmr_parser==0.8 # homeassistant.components.climate.honeywell evohomeclient==0.2.5 From f6b376823627528c05a0df9c51f8eb6efac7f73f Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Sun, 4 Jun 2017 22:20:16 +0200 Subject: [PATCH 2/4] Revert "Using dev branch until released upstream." This reverts commit 53e8de112cb0c47ac5031aacd74a5b18b4a418e2. --- homeassistant/components/sensor/dsmr.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/homeassistant/components/sensor/dsmr.py b/homeassistant/components/sensor/dsmr.py index 0d1dfa99485000..8347eac331d119 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -40,12 +40,7 @@ _LOGGER = logging.getLogger(__name__) -# REQUIREMENTS = ['dsmr_parser==0.9'] -# using dev branch until released upstream -# https://github.com/ndokter/dsmr_parser/pull/23 -REQUIREMENTS = ['https://github.com/aequitas/dsmr_parser/archive/dsmr5.zip' - '#dsmr_parser==0.9'] - +REQUIREMENTS = ['dsmr_parser==0.8'] CONF_DSMR_VERSION = 'dsmr_version' CONF_RECONNECT_INTERVAL = 'reconnect_interval' From 576fcd6dfa739cc22516b9202791f115b93264b8 Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Sun, 4 Jun 2017 22:20:17 +0200 Subject: [PATCH 3/4] Revert "Give good example." This reverts commit 4f90fc4be677634fc7e951b4b79aa57c8213b8f8. --- homeassistant/components/sensor/dsmr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/dsmr.py b/homeassistant/components/sensor/dsmr.py index 8347eac331d119..127d16bc5e8db2 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -93,7 +93,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): devices = [DSMREntity(name, obis) for name, obis in obis_mapping] # Protocol version specific obis - if dsmr_version in ('4', '5'): + if dsmr_version in ['4', '5']: gas_obis = obis_ref.HOURLY_GAS_METER_READING else: gas_obis = obis_ref.GAS_METER_READING From a6d348193773f89fe6e939f222aa1f7517f4a9c6 Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Sun, 4 Jun 2017 22:21:09 +0200 Subject: [PATCH 4/4] Revert "Allow configuring DSMR5 protocol." This reverts commit 9fa0e14187e32521e2f51cf2183a9070ee093bd0. --- homeassistant/components/sensor/dsmr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/dsmr.py b/homeassistant/components/sensor/dsmr.py index 127d16bc5e8db2..23324fe73603b6 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -60,7 +60,7 @@ vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.string, vol.Optional(CONF_HOST, default=None): cv.string, vol.Optional(CONF_DSMR_VERSION, default=DEFAULT_DSMR_VERSION): vol.All( - cv.string, vol.In(['5', '4', '2.2'])), + cv.string, vol.In(['4', '2.2'])), vol.Optional(CONF_RECONNECT_INTERVAL, default=30): int, }) @@ -93,7 +93,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): devices = [DSMREntity(name, obis) for name, obis in obis_mapping] # Protocol version specific obis - if dsmr_version in ['4', '5']: + if dsmr_version == '4': gas_obis = obis_ref.HOURLY_GAS_METER_READING else: gas_obis = obis_ref.GAS_METER_READING