#Event trigger

1 messages · Page 1 of 1 (latest)

quasi stirrup
#

In the LG ThinQ integration for my washing machine there is event.front_load_washer_notification when the wash completes. I do not understand how to trigger on this to get a notification. I tried an event trigger with the type being event.front_load_washer_notification. This never fires so it looks like I am not understand how the event trigger works. Can someone point me in the right direction?

halcyon zenith
#

That's not a type, it's an entity

#

the state of that entity will reflect the last time it fired/was received, and there will be an attribute called event_type that you can check to see if it's the one you want.

#

just use a state trigger

quasi stirrup
#

I am not understanding what the entity is?

halcyon zenith
#

event.front_load_washer_notification

quasi stirrup
#

Notification?

halcyon zenith
#

find it in devtools -> States and see what event_type attribute value you want to trigger on

#

then make a state trigger for that

quasi stirrup
#

Thank you. I'll play with it and see what I get.

quasi stirrup
#

I am just tying to send a notification that it is done. Usually I can do this easily.

halcyon zenith
#

it's pretty straightforward

#

trigger on state or attribute change, notify

quasi stirrup
#

I guess I made the mistake in setting up the automation in the automation editor and starting with a trigger?

halcyon zenith
#

all automations start with a trigger 🤷

#

it's the defining characteristic of an automation

quasi stirrup
#

Mistyped. I stated with the type as event.front_load_washer_notification

halcyon zenith
#

yes, if you tried to create an event trigger, you were on the wrong track

#

you can do that as well, but the point of the event entity is to make it more user friendly

quasi stirrup
#

I guess that is why it never worked

#

You typed earlier a change in state. I do not see this in the create automation menu

halcyon zenith
#

a state trigger is most the basic trigger

#

they call it "Entity" here:

#

I don't use the UI editor and don't keep up with the terminology there. It's a state trigger

#

click that, and then "State"

lofty idol
#

Just add a state trigger (Entity => State, or just search for 'state'), like you would for a binary_sensor for example. As entity you use event.front_load_washer_notification. Set 'to' as 'any state'. Do not make it trigger on the event_type attribute! That will not change when you have two events that are the same an thus will not give you a trigger. If you want to only do stuff on a certain event_type make it a separate condition and leave the trigger to 'any state'.

quasi stirrup
#

I think I understand. This is what I have now: ```
alias: Wash done
description: ""
triggers:

  • trigger: state
    entity_id:
    • event.front_load_washer_notification
      to: null
      conditions:
  • condition: state
    entity_id: event.front_load_washer_notification
    attribute: event_type
    state: washing_is_complete
    actions:
  • action: notify.mobile_app_pixel_9_pro_xl
    metadata: {}
    data:
    message: Wash done 6-17
    mode: single
#

I'll see if it works at next wash.