Temperature difference automation - sensor (?) help

Hi all
I have an aqara temperature sensor (out of home) and I need to trigger an automation when the temperature is higher than 1-2 points after the night.
So ideally at 05:30 in the morning I would like a custom sensor (?) to check and keep the given temperature. for example 7 Celsius.
When the temperature rise to 8-9 Celsius, I would like to trigger an automation.
Can someone give a hint how to achieve this?

  • my aqara sensor name is = sensor.outdoor_temperature_2

Maybe one of the statistics integrations can help.

As an alternative

  • create an input_number helper
  • create an automation that copies the state/value of sensor.outdoor_temperature_2 into that input_number at 5:30h.
  • create an automation that triggers, if current value of sensor.outdoor_temperature_2 is 1-2 points higher as input_number and time is after 05:30h

I like the alternative but I have trouble how to copy the value of the sensor in the input_number helper.
Can you give an example of the automation to get me started?

action:
  service: input_number.set_value
  data:
    value: "{{ states('sensor.outdoor_temperature_2') | float }}"
  entity_id: input_number.temperature_at_sunrise
1 Like

I tried today and it is working.
Thanks!