Hi, I am looking to expand on a simple alert automation for my freezer temperature, where I have an Inkbird located.
Currently it just alerts me if the temperature is above x degrees for x time - but the time window is quite large, and I think it can be better.
If the temperate is dropping again, after a shorter window, I can safely know that the door is closed or the mains power is still on etc, thereby enhancing the accuracy of the alert.
So - how do I modify this to include the condition that the temperature is not falling again, after a certain time period?
Vaguely looking at threshold sensors, or derivative sensors, or template/helper from a last known value etc, just not sure which is the simplest or best method to achieve, (or really know how exactly to apply them, TBH), ideally including surviving a restart of HA.
Current basic automation:
alias: Warm Freezer
description: ""
triggers:
- trigger: numeric_state
entity_id:
- sensor.ibs_th2_freezer_temperature
for:
hours: 0
minutes: 10
seconds: 0
above: -6
conditions: []
actions:
- action: notify.mobile_app_sm_s921b
metadata: {}
data:
message: The FREEZER is getting warm!
title: FREEZER WARM!!
data:
channel: Food Alarm
importance: high
vibrationPattern: 10, 1000, 10, 1000, 10, 1000, 10, 1000
ledColor: red
notification_icon: mdi:snowflake-thermometer
- data:
volume_level: 0.5
target:
device_id: a0f67ce9103f33a14c04c21934a78020
action: media_player.volume_set
- data:
entity_id: media_player.nest_mini_lounge
message: >-
The FREEZER is getting warm!! Is the door closed properly? Please check
the freezer.
language: en-GB
cache: true
action: tts.cloud_say
mode: single
This is an example of some innocuous freezer access.
You can see that it takes nearly an hour to return to fully cold - but everything is ok here, and as soon as it started dropping again I could condition it as not passing on to the alert.
Any guidance appreciated!