Open mguyard opened 12 months ago
The automation is triggered, but all unnecessary triggers should be filtered by conditions specified here
Hopefully the blueprint won't be necessary soon.
what about is we modify
to
trigger:
- platform: event
event_type: state_changed
id: state_changed
entity_id: !input vacuum
?
because currently it get as trigger every state changes (that ok, will be filtered by condition, but anyway ....)
This event trigger can't be changed in this way - it is used in browser mode:
is_browser_mod_template_trigger: |-
{{
mode_to_handle in ['browser_mod_path']
and trigger.id == 'state_changed'
and (
trigger.event.data.new_state != None
and trigger.event.data.new_state.attributes != None
and "pathSegments" in trigger.event.data.new_state.attributes
and browser_mod_path == trigger.event.data.new_state.state
or
trigger.event.data.old_state != None
and trigger.event.data.old_state.attributes != None
and "pathSegments" in trigger.event.data.old_state.attributes
and browser_mod_path in trigger.event.data.old_state.state
)
}}
Description
Hello,
Since today, i've tested your new update_map_extractor.yaml blueprint (previously using disable_vacuum_camera_update_when_docked.yaml).
As i can see, each time an event with an event_type state_changed is trigger, automation start. So on a normal HA installation, automation start many time in the same seconds/minutes.
Solution
To optimize this, is it possible to filter trigger event by specifying event_data for example ? As i don't really understand what you look in event, i don't know what filter to apply.
Alternatives
No response
Context
No response