From e0de52138868ac8ced4c07c960e06f37936d5219 Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Wed, 4 Oct 2017 10:20:08 +0200 Subject: [PATCH] Implement DSMR5 support. (#9686) * Allow configuring DSMR5 protocol. * Give good example. * Using dev branch until released upstream. * Update to dsmr_parser supporting v5 arguments. * Update to latest dmsr parser, preventing exceptions thrown where warnings would suffice. * Update even more * Update requirements. * Update requirements --- 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 2b303ac3c71..5b20ac0f4d0 100644 --- a/homeassistant/components/sensor/dsmr.py +++ b/homeassistant/components/sensor/dsmr.py @@ -40,7 +40,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ 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(['4', '2.2'])), + cv.string, vol.In(['5', '4', '2.2'])), vol.Optional(CONF_RECONNECT_INTERVAL, default=30): int, }) @@ -73,7 +73,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 == '4': + if dsmr_version in ('4', '5'): gas_obis = obis_ref.HOURLY_GAS_METER_READING else: gas_obis = obis_ref.GAS_METER_READING