[SOLVED] Modbus issue after update 2024.3 - Cannot access same input register twice

Hello community,
I have a problem with modbus connected to LG Therma V heat pump. Everything was working just fine but after latest update I cannot read one of the sensors defined in modbus config file anymore. This sensor monitors outlet water temperature.


After reviewing config I realized that same register is used under the climate entity to show the temp from heating pump. Climate working fine but sensor cannot access registar anymore.
If I disable climate, sensor starts to work normal again!

Sensor definition:

- name: "hp_outlet_temp"
      scale: 0.1
      precision: 1
      scan_interval: 30
      address: 3
      slave: 1
      unit_of_measurement: "°C''
      device_class: temperature
      input_type: input

Climate definition:

climates:
    - name: "hp_heating_climate"
      address: 3
      slave: 1
      input_type: input
      max_temp: 50
      min_temp: 25
      offset: 0
      precision: 0
      scale: 0.1
      target_temp_register: 2
      temp_step: 1
      temperature_unit: C
      write_registers: true
      hvac_mode_register:
        address: 0
        values:
          state_heat: 4
          state_auto: 3

As you can see above they are using same register address on the same slave address.
Anyone else has this issue?
I was reading release notes for latest update and noticed that something has been changed for modbus module.

Thanks,
Vuk

I’ve brought up an issue here, unfortunatelly the developer hasn’t been very helpful :man_shrugging:: Lost Modbus Sensor after upgrade to Core 2024.3 · Issue #112607 · home-assistant/core · GitHub

Would anyone be able to provide guidance on configuring this using “automation”?

I will not use any automation for this. I will rather stay on prevous version for HA.
Using input register for temp in climate definition for modbus is very clear. With latest update if you want to have sensor for the same thing you will need to use automation…
Anyway same goes for hvac_onoff_register in climate definition which is hardcoded for holding register in HA. As you probably know in LG heat pumps, on/off state is stored in coil register so you cannot use hvac_onoff_register from climate to control on/off state. I had to create separate toggle to power on/off heat pump…

So you are opting for not receiving additional ha updates for ever, for this?

Surely the issue here is terminology. You dont need an automation but a template sensor.

Create a template sensor to use the value of current temp from the climate entity and add a state class of measurement to it. You will then get the stats you are looking for without duplicating the modbus address reading.

Exactly, I’ve used automation word as I was reading previous posts. My bad!

I used template to create sensor and put something like this:

{{ state_attr('climate.hp_heating_climate', 'current_temperature') }}°C
1 Like

Just to be clear, both automation and templates will work.

I have both in my production system, for 2 different purposes…

  • templates are simplest to use for statistics
  • automation is triggered by every change, and allows to e.g. remove “unavailable” which happens during reconnect, which avoids “holes” in the statistic.
2 Likes

Thank you all for your support and solutions for this topic.
I am using template to create sensor and it is working just fine for me! This is a basic temp sensor used on several cards to provide outlet temp on a heatpump.

Thanks once again!

1 Like

Yeap! Just copy paste in configuration.yaml

sensor:
  - platform: template
    sensors:
      lg_therma_outlet_temp:
        friendly_name: "Lg Therma V Outlet Temperature"
        unit_of_measurement: "°C"
        value_template: "{{ state_attr('climate.lg_therma_climate_control', 'current_temperature') }}"

Where climate.lg_therma_climate_control the name of your climate control

I have another MODBUS problem, after this update my SMA inverter is gone, no values are pulled from it, no idea how to solve this or what is being asked from me to get it running again.
Read several posts about it, but I am stuck.