I have an automation that fires when a PIR sensor picks up motion.
The triggers are set as 2 different sensors in 2 different rooms, and so have 2 different entity_ids.
When motion is detected, I fire a notification to my phone via pushbullet.
I would like the notification to stipulate where the motion was detected.
Looking through the docs I think its possible using templating, but I cant figure it out.
I create all my automations via the front end configuration panel, and my automations.yaml file doesn’t really seem to make much sense, or at least have a logical flow to it?
Could anyone help me out?
Do people generally use the front end to create and manage automations, or is it best to ‘manually’ create them in a .yaml file?
you’d then need to replace binary_sensor.pir_name with the name of your sensor…
I have no idea how you defined your MQTT Sensor, though I would expect them to be binary as they’ll either return a status showing motion (so on) or no motion (so off) and they should therefore be defined as binary_ssensors.
In addition you can define them with device_class: motion and they’ll behave as motion sensors in HA.
if you provide an extract if your config I can have a closer look