Fix trigger to use domain-based filtering
Replaces template variable in trigger entity_id with domain/device_class trigger and condition filter. This properly handles dynamic sensor selection from target selector. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -81,9 +81,12 @@ variables:
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- trigger: state
|
- trigger: state
|
||||||
entity_id: "{{ sensors }}"
|
domain: binary_sensor
|
||||||
|
device_class: occupancy
|
||||||
|
|
||||||
condition: []
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ trigger.entity_id in sensors }}"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
|
|||||||
Reference in New Issue
Block a user