Trigger based Template Sensor and decreasing values not triggering

I have the following Trigger based Template Sensor which works fine.

- trigger:
     - platform: state
       entity_id:
         - sensor.electricity_import_daily_cost
       to:
     - platform: time
       at: '00:00:00'
   sensor:
     - name: "TS Todays Electricity Import Costs"
       unique_id: ts_todays_electricity_import_costs
       state: >
         {{ [this.state | float(0), states('sensor.electricity_import_daily_cost') | float(0)] | max
           if trigger.platform == 'state' else 0 }}
       unit_of_measurement: 'GBP' 
       device_class: "monetary"

As you can see I had set it to max. This seemed to be logical, but I have now realise that my electricity tariff can go negative and I am paid to use electricity. This means sensor.electricity_import_daily_cost can go down as well as up. Here is an example from today.

I thought this would be easy to fix, remove the max. This did not work.

  # Today's Import costs new 
 - trigger:
     - platform: state
       entity_id:
         - sensor.electricity_import_daily_cost
       to:
     - platform: time
       at: '00:00:00'
   sensor:
     - name: "TS Todays Electricity Import Costs"
       unique_id: ts_todays_electricity_import_costs
       state: >
         {{ [this.state | float(0), states('sensor.electricity_import_daily_cost') | float(0)]
           if trigger.platform == 'state' else 0 }}
       unit_of_measurement: 'GBP' 
       device_class: "monetary"

As you can see, it correctly reset to 0 at midnight, but did not go down to reflect sensor.electricity_import_daily_cost what have I missed?