Only if it stops on 25° on the way, if it jumps over it, it wont trigger. Also it wont trigger because you are monitoring the unit of measurement attribute which will always be °C, the unit is not the state.
And in autiomations.yaml the notification is like this, and wont allow to convert it to alert. Tried also put “repeat” there, but it isnt repeating anything:
- id: '1636234383087'
alias: Upstairs too hot
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.ylakertatemp
for: 00:00:01
above: '22'
condition: []
action:
- device_id: 5f39f21ec1b4ca33dd6b4c3a3aefdbcf
domain: mobile_app
type: notify
title: Upstair too hot!
message: Upstair too hot!
repeat: 00:00:20
mode: single
If I would try to follow that Alert instruction and make it to temperatures, what would be the “platform” I need to use?
alert:
ylakertatemp:
name: Upstairs too hot
entity_id: binary_sensor.temp_above_22c
state: "on"
repeat: 00:00:15
can_acknowledge: true
skip_first: false
notifiers:
- SM-G973F
As the alert can be acknowledged (cancelled) it is much better than using your automation with a repeat loop, but if you really want to use an automation with a repeat it could be done like this:
- id: '1636234383087'
alias: Upstairs too hot
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.ylakertatemp
for: 00:00:01
above: '22'
condition: []
action:
- repeat:
while:
- condition: numeric_state
entity_id: sensor.ylakertatemp
above: 22
sequence:
- device_id: 5f39f21ec1b4ca33dd6b4c3a3aefdbcf
domain: mobile_app
type: notify
title: Upstair too hot!
message: Upstair too hot!
- delay: 15 # send every 15 seconds
mode: single
Edit: Seems that this doesnt work. I need to change that “repeat” a little bit as it didnt accept that time format. That SM-G973F is device name for my phone with app. Dont know what else I should put there. What else could be wrong here?
First thouht there were some problems in log to find my phone. But it seemed to relate to automation notification. Turned automation notifications off and these two came when temperature rise:
Command failed: /opt/vc/bin/vcgencmd measure_clock arm
12:51:10 PM – (ERROR) command_line - message first occurred at 12:38:09 PM and shows up 28 times
Error doing job: Task exception was never retrieved
12:48:56 PM – (ERROR) core.py
What does this mean, that notification must be done first? I get notifications to phone, but how do I know if I have done that properly?
"
The alert integration makes use of any of the notification integrations. To setup the alert integration, first, you must setup a notification integration.
"