lidans5
(lior)
January 12, 2022, 8:19pm
1
what would be the right syntx if I would like to add another entitiy to be turned off at this automation (ignore the condition…)
alias: 'Turn Off second floor Bathroom light '
description: After 15Min
trigger:
- type: no_motion
platform: device
device_id: 42a53a88cd153c09ebb714c8d162510b
entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_4b1c8b06_ias_zone
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
condition:
- condition: state
entity_id: *********
state: 'off'
action:
- service: switch.turn_off
target:
entity_id: switch.childern_bath_2_2
mode: single
m0wlheld
(Christoph Dahlen)
January 12, 2022, 8:25pm
2
Hey don‘t you just use the graphical automation editor?
lidans5
(lior)
January 12, 2022, 8:41pm
3
you are right, tried and succeeded
finity
January 13, 2022, 2:49am
4
For future info…
action:
- service: switch.turn_off
target:
entity_id:
- switch.childern_bath_2_2
- switch.some_other_switch
lidans5
(lior)
January 13, 2022, 3:49am
5
nope, didn’t work, only this worked:
action:
- service: switch.turn_off
target:
entity_id: switch.childern_bath_2_2
- service: switch.turn_off
target:
entity_id: switch.childern_bath_3
mode: single
finity
January 13, 2022, 3:58am
6
lidans5:
nope, didn’t work,
It should have.
It’s always worked that way in the past and I just checked in the UI services tab and when I added two entities looking at the resulting yaml it is exactly as I posted it above (aside from a blank “data:” line).
unless there is a bug.
But I guess I don’t know what you mean “didn’t work”.
It didn’t pass config validation or didn’t actually switch off both switches?
lidans5
(lior)
January 13, 2022, 4:11am
7
really strange I added with the UI and got another result (the one mentioned above,
didn’t work, i.e when I tried adding through the yaml way (in the ui) as you suggested, it erased automatically the second entity
m0wlheld
(Christoph Dahlen)
January 13, 2022, 5:57am
8
Maybe you messed up file permissions during manual editing?
lidans5
(lior)
January 13, 2022, 2:46pm
9
Could be, how can I check?
m0wlheld
(Christoph Dahlen)
January 13, 2022, 2:58pm
10
ls -la /config/automations.yaml