Sum of sensor

Hello Every Body I try to calculate the consuption power of my light on and standby? I create this sensor

  - platform: template
    sensors:
      wlight_abi:
        unit_of_measurement: "W"
        entity_id: group.light_chabi
        value_template: >-
          {% if is_state('group.light_chabi', 'on') %}
            15.5
          {% else %}
            1,5
          {% endif %}
      wlight_ana:
        unit_of_measurement: "W"
        entity_id: group.light_chana
        value_template: >-
          {% if is_state('group.light_chana', 'on') %}
            15.5
          {% else %}
            1,5
          {% endif %}          
      wlight_total:
       friendly_name: 'Total Power'
       entity_id:
        - sensor.wlight_abi
        - sensor.wlight_ana
       value_template: "{{ (states('sensor.wlight_abi')|float + states('sensor.wlight_ana')|float )}}"
       unit_of_measurement: "W"

when light is on power on one group is 15.5 when light is off power is 1.5w
if A is group one and B is group 2
(A) + (B) is the sum
(A off) + (B off ) result → 0w but A show 1.5w and B show 1.5 w

image

(A on) + (B off) result → 15.5w Nok A is 15.5 but B is 1.5w result should be 17W

image

Can you help me thanks

You are mixing up your decimal point symbols. Which is it , or .?

          {% if is_state('group.light_chabi', 'on') %}
            15.5
          {% else %}
            1,5
          {% endif %}

Also remove the entity_id: option. This has been depreciated for quite a few versions.

  - platform: template
    sensors:
      wlight_abi:
        unit_of_measurement: "W"
        value_template: >
          {% if is_state('group.light_chabi', 'on') %}
            15.5
          {% else %}
            1.5
          {% endif %}
      wlight_ana:
        unit_of_measurement: "W"
        value_template: >
          {% if is_state('group.light_chana', 'on') %}
            15.5
          {% else %}
            1.5
          {% endif %}          
      wlight_total:
       friendly_name: 'Total Power'
       value_template: "{{ states('sensor.wlight_abi')|float + states('sensor.wlight_ana')|float }}"
       unit_of_measurement: "W"