Combine two values into one value

My home battery got these two sensors:
sensor.marstek_batterij_0_charge_power
sensor.marstek_batterij_0_discharge_power

How can I combine these two sensors into one sensor, and use that last sensors value to show it as a gauge?

There are multiple options…

Sensor Group

Combine the State… Helper (aka Min/Max integration)

Template Sensor

All three of the above can be set up through the Helpers tab

Hello Kris,

I made for something else but usable for your solution too the following :

  • create a gauge at your dashboard for sensor.marstek_batterij_0_charge_power
  • create a gauge at your dashboard for sensor.marstek_batterij_0_discharge_power

The first card enable visible if the Marstek is charging.

visibility:
  - condition: state
    entity: sensor.rs485_venus_marstek_inverter_state
    state: Charge

The second card enable visible if the Marstek is discharging.

visibility:
  - condition: state
    entity: sensor.rs485_venus_marstek_inverter_state
    state: Discharge