Gas consumption from DSMR is parsed but not stored in HA

Hi,

I had 2 devices loaded in to Home assistant through “DSMR Slimme lezer” (gas and electricity). The IP address changed for this device, since I couldn’t find an easy way in the UI to change the IP I removed the original device and re-added the device with the new IP. Now the electricity meter is working correctly again but the gas meter keeps stating that the value is Unknown.

When i look in the debug output i see the following logs:

2023-10-25 12:09:37.349 DEBUG (MainThread) [dsmr_parser.clients.protocol] received data:
2023-10-25 12:09:37.349 DEBUG (MainThread) [dsmr_parser.clients.protocol] got telegram: /Ene5\T211 ESMR 5.0

1-3:0.2.8(50)
0-0:1.0.0(231025120923S)
0-0:96.1.1(4530303632303030303036373934373232)
1-0:1.8.1(001145.074*kWh)
1-0:1.8.2(000215.873*kWh)
1-0:2.8.1(000443.228*kWh)
1-0:2.8.2(001148.753*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.075*kW)
1-0:2.7.0(00.303*kW)
0-0:96.7.21(00057)
0-0:96.7.9(00003)
1-0:99.97.0(0)(0-0:96.7.19)
1-0:32.32.0(00002)
1-0:52.32.0(00002)
1-0:72.32.0(00002)
1-0:32.36.0(00000)
1-0:52.36.0(00000)
1-0:72.36.0(00000)
0-0:96.13.0()
1-0:32.7.0(232.0*V)
1-0:52.7.0(231.0*V)
1-0:72.7.0(234.0*V)
1-0:31.7.0(000*A)
1-0:51.7.0(001*A)
1-0:71.7.0(000*A)
1-0:21.7.0(00.000*kW)
1-0:41.7.0(00.075*kW)
1-0:61.7.0(00.000*kW)
1-0:22.7.0(00.139*kW)
1-0:42.7.0(00.000*kW)
1-0:62.7.0(00.163*kW)
0-1:24.1.0(003)
0-1:96.1.0(4730303533303033363933333733383138)
0-1:24.2.1(231025120500S)(08441.814*m3)
!21E7

When i parse this in the same parser DSMR uses I can read the gas value:

from dsmr_parser import telegram_specifications
from dsmr_parser.parsers import TelegramParser


telegram_str = (
 # The value from above
)

parser = TelegramParser(telegram_specifications.V5)

# see 'Telegram object' docs below
telegram = parser.parse(telegram_str)
print(telegram.HOURLY_GAS_METER_READING.value)
print(telegram.HOURLY_GAS_METER_READING.unit)
> 8441.814
> m3

Now I don’t really know how homeassistant uses this data after parsing. Does anyone have any idea where this could go wrong or any pointers for where to look? Thanks :slight_smile:


Edit: also the entry in my config_entries shows the correct id (I think):

        "entry_id": "f019e937833ac1f306286ec232461f44",
        "version": 1,
        "domain": "dsmr",
        "title": "192.168.2.1:23",
        "data": {
          "host": "192.168.2.1",
          "port": 23,
          "dsmr_version": "5B",
          "serial_id": "4530303632303030303036373934373232",
          "serial_id_gas": "4730303533303033363933333733383138",
          "protocol": "dsmr_protocol"
        },
        "options": {
          "time_between_update": 10
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": "4530303632303030303036373934373232",
        "disabled_by": null
      }