Hey,
I’m wondering if this is possible to apply a “template” rule to a category of devices or entities? For example, I’d like for all “motion” sensors, if “motion” is detected, “turn on the lights” for the area that sensor is associated with. Right now I’m doing this for each sensor, so wondering if something generic is supported here for simplicity?
Don’t think you can really get around manually adding all the sensors to your automation, but you can easily make an action which turns on all lights within the same area. Something like this:
triggers:
- trigger: state
entity_id:
- binary_sensor.motion_1
- binary_sensor.motion_2
to: "on"
actions:
- action: light.turn_on
target:
area_id: "{{ area_id(trigger.entity_id) }}"