Sold electricity multiply with floating nordpool price as a notification

Hi!
I have one automation where i have the bought electricity multiply with my price and that sends me a notification when my solar panels have stopped so i know how much i have bought today.

But now i want the same for sold electricity, so my sold electricity multiply with floating nordpool price.
I think i can use the same code as the bought electricity but i need “grid_export_solar_daily_energy multiply with nordpool_kwh_fi_eur_3_10_024”
Can someone guide me?

Here is the code for the bought electricity:

alias: Köpt El
description: ""
trigger:
  - platform: template
    value_template: "{{ (states('sensor.active_power') | float(0) * 1000.0) < 1 }}"
    for: "00:00:00"
condition: []
action:
  - service: notify.notify
    data:
      message: >-
        Köpt El idag:  {{ (states('sensor.grid_import_solar_daily_energy') |
        float(0) * 0.18) }} €
mode: restart

 Köpt El idag:  {{ (states('sensor.grid_export_solar_daily_energy') |
        float(0) * states('sensor.nordpool_kwh_fi_eur_3_10_024) | float(0)) }} €

I tried that but i get a error Message malformed: template value should be a string for dictionary value @ data[‘action’][0][‘data’]

This is the code:

alias: Såld El
description: ""
trigger:
  - platform: template
    value_template: "{{ (states('sensor.active_power') | float(0) * 1000.0) < 1 }}"
    for: "00:00:00"
condition: []
action:
  - service: notify.notify
    data:
      message: >-
        Köpt El idag:  {{ (states('sensor.grid_export_solar_daily_energy') |
        float(0) * states('sensor.nordpool_kwh_fi_eur_3_10_024) | float(0)) }} €
mode: restart

I get this when I run in developer tools with my entities:

Thank you.
I had a quote missing after 024 in:
float(0) * states('sensor.nordpool_kwh_fi_eur_3_10_024) | float(0)) }} €

One more question, how do i get only 2 or 3 numbers after the decimal?
Now it is 96.60814065, like it to be 96.6 or 96.60

I managed to figure it out, needet to add {{ ‘%.2f’ | format before (states

{{ '%.2f' | format(states('sensor.grid_export_solar_daily_energy') | float(0) *
        states('sensor.nordpool_kwh_fi_eur_3_10_024') |float) }}€
alias: Producerat, sålt, köpt idag (Duplicate)
description: ""
trigger:
  - platform: template
    value_template: "{{ (states('sensor.active_power') | float(0) * 1000.0) < 1 }}"
    for: "00:00:00"
condition: []
action:
  - service: notify.notify
    data:
      message: >-
        Energiproduktionen upphörde idag.   Producerad El idag: 
        {{states('sensor.daily_yield')}} kwh.   Köpt idag: 
        {{states('sensor.grid_import_solar_daily_energy')}} kWh.   Sålt idag: 
        {{states('sensor.grid_export_solar_daily_energy')}} kWh.  Pris för köpt
        energi:  {{ '%.2f' | format(states('sensor.grid_import_solar_daily_energy') | float(0)
        * 0.18) }} €  Pris för såld energi:  {{ '%.2f' | format(states('sensor.grid_export_solar_daily_energy') | float(0) *
        states('sensor.nordpool_kwh_fi_eur_3_10_024') |float) }}€
mode: restart

I noticed that the price uses the latest nordpool price, so it is not correct, once every hour the price changes and then when the automation runs, it uses the latest price to get the electricity price, it should use every price in the last 24 hours.
I want to have the total costs at the end of the day (total costs * sold energy)
So:
00:00-01:00=0.347 * electricity sold=
01:00-02:00=0.261 * electricity sold=
02:00-03:00=0.211 * electricity sold=
03:00-04:00=0.194 * electricity sold=
04:00-05:00=0.211 * electricity sold=
and so on…

This is todays prices:
0.347, 0.261, 0.211, 0.194, 0.211, 0.285, 0.438, 0.779, 0.809, 0.843, 0.794, 0.761, 0.684, 0.681, 0.643, 0.682, 0.707, 0.744, 0.784, 0.864, 0.929, 0.775, 0.725, 0.552

So we say the clock is 05:00 it needs to add all the first 5 hours when i run the actions and that sums up to 1,22€.
Now it works so it uses the last nordpool price in all the previous hours (5 * 0.211=1,055 * kwh i sell.

alias: Producerat, sålt, köpt idag
description: ""
trigger:
  - platform: template
    value_template: "{{ (states('sensor.active_power') | float(0) * 1000.0) < 1 }}"
    for: "00:00:00"
condition: []
action:
  - service: notify.notify
    data:
      message: >-
        Energiproduktionen upphörde idag.   Producerad El idag: 
        {{states('sensor.daily_yield')}} kwh.   Köpt idag: 
        {{states('sensor.grid_import_solar_daily_energy')}} kWh.   Sålt idag: 
        {{states('sensor.grid_export_solar_daily_energy')}} kWh.  Pris för köpt
        energi:  {{ '%.2f' |
        format(states('sensor.grid_import_solar_daily_energy') | float(0) *
        0.18) }} €  Pris för såld energi:  {{ '%.2f' |
        format(states('sensor.grid_export_solar_daily_energy') | float(0) *
        states('sensor.nordpool_kwh_fi_eur_3_10_024') |float) }}€
mode: restart

I do something very similar - I calculate an “effective” price for my electric power (e.g. in case I produce 2 kW but use 4 kW, my current price is half the price I pay per kWh). I calculate my power usage with this price. Therefore I use template sensors that calculate the “cost per hour”, e.g. like that

{{ (states('sensor.el_power_heater') | float(0) * states('sensor.current_electricity_price') | float(0)) / 1000 }}

This is the input for an integration sensor (Rieman sum) with method “left”. By that, I get the sum of the cost. This is then the input for multiple utility meter sensors (day, month, year…).
I think this would work in your case too.