Been trying to find out if its possible to set up an alert based on a condition. I have read other similar post, but so far no luck.
The case:
I would like an alert if my garage door is open, but only if a boolean is off.
Could I somehow set this up as a binary sensor with a template stating that the binary sensor is off if door is open and boolean is on, and on if door is open and boolean is off. This way the alert can trigger if the binary sensor is on. And how do one write this template?
Sure. Without testing, an automation could look like:
- alias: "Garage door open alert"
trigger:
platform: state
entity_id: binary_sensor.garasjedor
to: 'on'
condition:
condition: state
entity_id: input_boolean.bryggedag
state: 'off'
action:
# alert
Thank you both. I was indeed asking for alerts, but always interested to know if there are other ways. So thanks for the automation example. I was under the impression that an automation would require notification, not alert, and then I would need a repeated notification.