I have an issue which seems to be related to the layout/formatting of my code, but I’ve been unable to find an answer or get it to work.
I’m creating a number of alerts to replace automations with notifications. I put an include line in my configuration file, and created alerts.yaml to house my alerts. The problem is that only the first alert works. The other 2 alerts do not work, even though the sensors are in a state where they should. There are no errors… it’s just like they aren’t there.
Would greatly appreciate some help figuring out why the second and third alerts don’t work. Thank you!
######## Alerts
freezer_high_temp:
name: "Freezer temp is too high"
title: Freezer temp is too high!
message: Current temp of {{ states("sensor.freezer_temp_temperature") }} is above the max of 12.
done_message: clear_notification
entity_id: sensor.freezertemphigh
state: "on"
repeat: 30
skip_first: true
data:
tag: freezer_high_temp
push:
sound:
name: default
critical: 1
volume: 0.25
notifiers:
- brian
mini_fridge_high_temp:
name: "Mini-fridge temp is too high"
title: Mini-fridge temp is too high!
message: Current temp of {{ states("sensor.mini_fridge_temp_temperature") }} is above the max of 40.
done_message: clear_notification
entity_id: sensor.minifridgehigh
state: "on"
repeat: 30
skip_first: true
data:
tag: mini_fridge_high_temp
push:
sound:
name: default
critical: 1
volume: 0.25
notifiers:
- brian
mini_fridge_low_temp:
name: "Mini-fridge temp is too low"
title: Mini-fridge temp is too low!
message: Current temp of {{ states("sensor.mini_fridge_temp_temperature") }} is below 34.
done_message: clear_notification
entity_id: sensor.minifridgelow
state: "on"
repeat: 30
skip_first: true
data:
tag: mini_fridge_low_temp
push:
sound:
name: default
critical: 1
volume: 0.25
notifiers:
- brian
But only the first alert works. The other two do nothing, even though the code is identical for the alert. I’m at a loss, though the fact that you pointed out that the alerts are defined now makes me think that the formatting is fine.
Interestingly, I tried moving the order of the alerts around, and it makes no difference. Only ‘freezer_high_temp’ works, no matter the order of the three alerts.
This may not be the best way to define the sensors (and I’d appreciate any feedback), but the sensors do work. Only the two alerts don’t actually work (they reflect ‘on’ when I manipulate the sensor value as expected… the alert just never goes to my devices.