Hello there, I already post a similar message to create a feature about that on this post. But I post here too if one or you having a smart work around to answer to my need.
Need : With the minimum configuration, I’d like to trigger my automation smarter than listing all my entities in my automation or creating a manual group for them.
To be the most flexible, I really want to NOT creating a manual group with my entities.
The user experience might be : I’ve got a new motion sensor entity. I put it in an area. And it could be trigger by my automation.
A quick example to show how it could be implemented :
WHEN motion is trigger…
THEN turn on the light of the motion_device’s area.
- id: 'turn_on_light'
mode: single
alias: 'Turn on light'
description: ''
trigger:
- platform: template
value_template: "{{ states.binary_sensor | rejectattr('attributes.device_class', 'undefined') | selectattr('attributes.device_class', 'eq', 'motion') | selectattr('state', 'eq', 'on') | list }}"
condition: []
action:
- service: light.turn_on
target:
area_id: "{{ area_id(target.entity_id) }}"
Any idear ?
Thanks a lot,
Lou_Juicy