Show negative value as 0

Hi,

I have a sensor that calculates the time until the jacuzzi is fully heated. The only issue with it that in case it is above the desired temperature, it shows a negative value.

Is there any way (maybe with a value template) to show all negative values as 0?

Thanks.

This should do it:

template:
  - sensor:
      - name: Time until spa ready
        state: "{{ [states('sensor.spa_wifi_controller_spa_time_to_ready')|float(0),0]|max }}"

Thanks so much. Works fine.