ESPhome globals above

Hi

I try to do some automation
I get error (expected float.)

globals:

   - id: Min_Cooler_Temperature
     type: float
     initial_value: '6'
     
   - id: Max_Heater_Temperature
     type: float
     initial_value: '80'
     
   - id: Temperature_Difference
     type: float
     initial_value: '2'
                    - if:
                        condition:
                          - sensor.in_range: 
                              id: "Cooler_Temperature"
                              above: id(Min_Cooler_Temperature) + id(Temperature_Difference)
                              
                        then:
                          - delay: 2s

Rather than using sensor.in_range, you might have to use lambda. As in:

- if:
  condition:
    lambda: 'return id(Cooler_Temperature).state > id(Min_Cooler_Temperature) + id(Temperature_Difference)

I haven’t tested it, but you don’t get any immediate errors with the code.

thanks @michaelblight its work