Allow configuring DSMR5 protocol.
parent
3bdf77ad62
commit
9fa0e14187
|
@ -60,7 +60,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.string,
|
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.string,
|
||||||
vol.Optional(CONF_HOST, default=None): cv.string,
|
vol.Optional(CONF_HOST, default=None): cv.string,
|
||||||
vol.Optional(CONF_DSMR_VERSION, default=DEFAULT_DSMR_VERSION): vol.All(
|
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,
|
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]
|
devices = [DSMREntity(name, obis) for name, obis in obis_mapping]
|
||||||
|
|
||||||
# Protocol version specific obis
|
# Protocol version specific obis
|
||||||
if dsmr_version == '4':
|
if dsmr_version in ['4', '5']:
|
||||||
gas_obis = obis_ref.HOURLY_GAS_METER_READING
|
gas_obis = obis_ref.HOURLY_GAS_METER_READING
|
||||||
else:
|
else:
|
||||||
gas_obis = obis_ref.GAS_METER_READING
|
gas_obis = obis_ref.GAS_METER_READING
|
||||||
|
|
Loading…
Reference in New Issue