#inovelli white event detection

1 messages · Page 1 of 1 (latest)

bleak zinc
#

I'm working Inovelli whites but getting no where trying to detect events.

Here is my automation:

alias: Office Lamp On/Off
description: ""
triggers:
  - trigger: state
    entity_id:
      - event.pauls_office_switch_button_config
    attribute: event_type
    to:
      - multi_press_1
conditions: []
actions:
  - action: light.toggle
    metadata: {}
    data: {}
    target:
      entity_id: light.paul_office_lamp
mode: single

The action runs fine when I test it (the light toggles.

No event seems to get captured by this automation, but if I check Activity, I see the presses:

Paul’s Office Switch Button (Config)
16 minutes ago
January 8, 2026 at 3:49 PM
Pressed once

Feels like I'm missing something obvious. Any pointers?

willow ridge
#

You need to remove the attribute: event_type and the to: multi_press_1 from your trigger. The way you have it now, the trigger will only fire the first time that event occurs. You’d need the attribute to change to something else, and then back to multi_press_1 for it to fire again.

If you remove everything, it will fire when the state changes, which will happen every time the event fires.

#

In order to run only when the event is multi_press_1, you need to add a template condition to check for that:
{{ trigger.to_state.attributes.event_type == 'multi_press_1' }}

#

You might also find it useful to filter on states that have timestamps very close to now. This prevents your automation firing when the event entity changes from unavailable to an old timestamp after a restart. Another template condition with:

{{ trigger.to_state.state | as_datetime(0|as_datetime) > now() - timedelta(seconds=5) }}
arctic vapor
bleak zinc
#

Thank you so much! The missing piece was separating the trigger from the condition I cared about. For now I've done this as the simple thing:

alias: Office Lamp On/Off
description: ""
triggers:
  - trigger: state
    entity_id:
      - event.pauls_office_switch_button_config
conditions:
  - condition: state
    entity_id: event.pauls_office_switch_button_config
    state:
      - multi_press_1
    attribute: event_type
actions:
  - action: light.toggle
    metadata: {}
    data: {}
    target:
      entity_id: light.paul_office_lamp
mode: single

Is there an advantage to templates over checking the event directly?

willow ridge
#

2 advantages:
1 - you don't have to repeat the reference to the event's enitity_id, so it makes managing your automation a bit simpler. If you change the entity in the future, you only have to change it in one place (the trigger). If you duplicate the automation to use on another entity, you only have to update it in one place.
2 - The trigger variable is populated when the trigger is fired, and remains unchanged for the rest of the automation's execution. State conditions, on the other hand, must access the entity's state in the state machine. The entity may have changed between when the trigger was fired compared to when the condition checks it. It also takes more resources to access the state machine.

1 disadvantage:
1 - you have to write templates, and don't have a nice UI to just select things. And if you don't understand the template, it makes managing your automation more difficult in the future.

The advantage #2 in this specific case is very minor. In this automation, the condition is checked immediately after the trigger fires. You'd have to have 2 events within a few microseconds of each other for anything weird to happen. That's pretty much impossible. And the amount of resources it takes to check the state machine is never going to be noticeable to you.