#Figuring out Presence sensor automations
1 messages · Page 1 of 1 (latest)
can you paste the yaml of your automation in a code block.
switch to yaml mode in the top right overflow menu (you can switch back after copying)
then paste it here inside of triple backticks.
description: ""
triggers:
- type: turned_off
device_id: a34440218fdb9624d774cf77d55a6d53
entity_id: f0a8b5fde5bf438742a50515605792b9
domain: light
trigger: device
- type: turned_off
device_id: 28bfaa8d87ee7eb5aa86d725c2489c3c
entity_id: 2fd7df9c9380aa37d429d63e76886b7d
domain: light
trigger: device
- type: turned_off
device_id: c04724a165c3621d045b80c50a6c82ec
entity_id: 0191a0ebcab5fbbf1295dec5236b96ee
domain: light
trigger: device
- type: turned_off
device_id: 6a46c03c7a59eb2c09190bd1a394eea8
entity_id: caa67e01cdf47c4adc43f2155e211292
domain: light
trigger: device
- type: turned_off
device_id: 86da1e16a4aa08cda7cb5d9e8a91ab6b
entity_id: 68c09e320364b334dfe30a4e6a0c1c82
domain: light
trigger: device
- type: turned_off
device_id: cb01d82860626313d558cf180c5981a0
entity_id: 0cc37ffa916dcddbc1b954e4a3377a17
domain: light
trigger: device
conditions:
- type: is_motion
condition: device
device_id: 94d6826b05508698932b00a4cf1002cd
entity_id: b52c134037c09f5baa6589423a707a0f
domain: binary_sensor
actions:
- type: turn_on
device_id: a34440218fdb9624d774cf77d55a6d53
entity_id: f0a8b5fde5bf438742a50515605792b9
domain: light
- type: turn_on
device_id: 28bfaa8d87ee7eb5aa86d725c2489c3c
entity_id: 2fd7df9c9380aa37d429d63e76886b7d
domain: light
- type: turn_on
device_id: c04724a165c3621d045b80c50a6c82ec
entity_id: 0191a0ebcab5fbbf1295dec5236b96ee
domain: light
- type: turn_on
device_id: 6a46c03c7a59eb2c09190bd1a394eea8
entity_id: caa67e01cdf47c4adc43f2155e211292
domain: light
- type: turn_on
device_id: 86da1e16a4aa08cda7cb5d9e8a91ab6b
entity_id: 68c09e320364b334dfe30a4e6a0c1c82
domain: light
- type: turn_on
device_id: cb01d82860626313d558cf180c5981a0
entity_id: 0cc37ffa916dcddbc1b954e4a3377a17
domain: light
mode: single ```
so... the automation reads:
When the light switches off, check to see if there is motion, if there is then switch on the light.
you need instead to trigger on motion changing to detected and use that to call turn on the light
then desperately trigger on motion changing to clear and use that to call turn off the light.
This "can" be done as a single automation with trigger ID's and choose blocks BUT it is probably easier to just do it as 2 separate automatons.
Oh I see. Could I do "When presence is detected, turn on lights" instead of "If lights are off, and presence is detected, turn on lights"?
yes, what you have above is being triggered by the light being switched off. you need to trigger on the motion sensor not the light state.
Ahhh ok. I just changed it and it works! Thank you so much