Multiply sensors

I want to multiply two sensors retrieving voltage and current information to get the power.
I thus obtain the charging power and the discharging power.
For the moment with all the configurations I try, I get the unknown information.

here are my tests templates:

template:
   - sensor:
          - name: "Puissance décharge Batterie"
            unit_of_measurement: 'W'
            device_class: power
            state: "{{((states('sensor.batt_discharge_current')| float(0) * states('sensor.battery_voltage')| float(0))) | round(2) }}"

Or

     - name: "Puissance charge Batterie"
       unit_of_measurement: "W"
       device_class: power
       state: >
         {{ [ states('sensor.battery_voltage'), 
              states('sensor.battery_charge_current') ]
              | map('float') | multiply }}
       availability: >
         {{ not 'unavailable' in 
            [ states('sensor.battery_voltage'), 
              states('sensor.battery_charge_current') ] }}`

But nothing happened

Thanks for your support

Give this a try:

template:
  - sensor:
    - name: "Puissance décharge Batterie"
      state: >-
        {% set state1 = states("sensor.batt_discharge_current") %}
        {% set state2 = states("sensor.battery_voltage") %}
        {% if is_number(state1) and is_number(state2) %}
          {{ ( state1|float * state2|float) | round(2) }}
        {% endif %}
      unit_of_measurement: "W"
      state_class: total
      device_class: power

Great, that’s the solution

THANKS