Summation of sensors

Hi,
i am gathering a lot of Data from my PV-Battery System via MQTT. And at some point i add up three sensors (Power of L1 , L2 and L3)

I am doing it with

   - sensor:
     - name: "AC-Last"
       state: "{{  states('sensor.Power_Consumption_L1')+ 
                              states('sensor.Power_Consumption_L2') + 
                              states('sensor.Power_Consumption_L3') }}"
       unique_id: "VESS_AC_20"

Sensor.Power_Consumptio_LX n is a listet Entity with a point as a decimalseperator (in HOAS as well as in the MQTT-Broker.

In the past i was happy with but since one of the last updates of HOAS it is not working anymore.
The current output of the mentioned state is like 19824512}

I also tried this ,what i copied from this forum:

  - sensor:
       - name: "AC-Consumption"
         unit_of_measurement: "W"
         device_class: power
         unique_id: "VESS_AC_30"
         state: >
           {{ [ states('sensor.Power_Consumption_L1'), 
                states('sensor.Power_Consumption_L2'),
                states('sensor.Power_Consumption_L3')]
                | map('float') | sum }}

but this one gives one “not available”

Does anyone could help me to add up these three parameters?

The first one would never have worked. You were adding strings not numbers. You need to convert the states (which are strings) to numbers before you can add them. You should also use an availability template to prevent odd readings if one or more sensors are unavailable. Particularly if you ever convert this sensor to energy for use with the energy dashboard. See: Why an availability template is important for energy template sensors

   - sensor:
     - name: "AC-Last"
       state: >
         {{ states('sensor.Power_Consumption_L1')|float + 
            states('sensor.Power_Consumption_L2')|float + 
            states('sensor.Power_Consumption_L3')|float }}
       availability: >
         {{ has_value('sensor.Power_Consumption_L1') and
            has_value('sensor.Power_Consumption_L2') and 
            has_value('sensor.Power_Consumption_L3') }}
       unique_id: "VESS_AC_20"

Thanks alot, it was another problem with L3.

Oh. I copied your entity_ids without realising they use capital letters. Entity ids are always lower case.

   - sensor:
     - name: "AC-Last"
       state: >
         {{ states('sensor.power_consumption_l1')|float + 
            states('sensor.power_consumption_l2')|float + 
            states('sensor.power_consumption_l3')|float }}
       availability: >
         {{ has_value('sensor.power_consumption_l1') and
            has_value('sensor.power_consumption_l2') and 
            has_value('sensor.power_consumption_l3') }}
       unique_id: "VESS_AC_20"