#Trying to get double tap to trigger an automation (GE Zwave Dimmer)

1 messages · Page 1 of 1 (latest)

hallow plaza
#

I can see in the device logbook that double tap is creating an event, but I cannot figure out how to correctly trigger off of it. It fires 255 for double tap up and 0 for double tap down.

Kitchen Lights fired Basic CC 'value notification' event for 'Event value': '255'
8:28:43 PM - 15 minutes ago
Kitchen Lights Event value detected an event
8:28:43 PM - 15 minutes ago

I got it to somewhat work like in the picture but it triggers on both up and down double taps. Is there a way to actually trigger off the value notification event and check the value?

spring field
#

you have to trigger on every event and use a condition to check the attribute. Therefore you need to remove the attribute in your screenshot and leave it blank. If you keep the attribute there, your automation won't trigger the second time if the same event occurs twice in a row.

hallow plaza
#

oh. that makes sense. I will give it a go when I get home this afternoon. Thanks for the help!

hallow plaza
#

do I do the conditional like this? the value is going to equal 255 on double tap on. so Event Value > 254?

#

and do the opposite for double tap off? Event value < 1

spring field
#

Use a state condition

#

Well I had assumed your integrations created an event entity. So you need to figure out if there is an event entity or if it’s just an event in the events bus. Go to integrations, find the integration you are using for this device, then find the device, and see if there any event entities listed.

hallow plaza
#

yes, I believe it is an event entity.

hallow plaza
hallow plaza
#

ok. home from the office. Tested what I changed. Does not work. Learned a bit about the traces view. Saw this.

Executed: January 20, 2025 at 5:38:45 PM
Result:
result: false
message: >-
attribute 'Event value' of entity event.kitchen_bar_lights_event_value does
not exist
entity: event.kitchen_bar_lights_event_value

event value does not exist. How do I figure out the attribute that is actually changing?

spring field
#

Go to developer tools -> states, and search for that entity. Look at what attributes it has after you double tap it (or whatever you are interested in triggering your automation)

hallow plaza
#

It changes the time stamp, but does not change the value.

#

unless I toggle between double tap up and down. then the value goes 255 to 0 and back

void vale
#

It's possible you're comparing string "255" with number 255, which will not work. For numeric attributes, you'll have to go to yaml mode and remove the quotes.

hallow plaza
#

Message malformed: expected str for dictionary value @ data['conditions'][0]['state']

#

it def has quotes, but wont let me remove them

void vale
#

You're confusing state and attributes.

hallow plaza
void vale
#

The state of an event entity is a timestamp.
There appears to be an attribute called value which has 255.

hallow plaza
#

ok..that makes sense

void vale
#

You can use state condition with attribute: value

#

and then state: 255

#

Also at some point you changed from kitchen_lights_event_value to kitchen_bar_lights_event_value.... so check that.

hallow plaza
#

oh...shoot

#

that did it!

#

thanks for your help!

#

so the line in the developer tools that say "value : 255" means the attribute is "value" and the value is "255"?

void vale
#

yeah everything in the third column are attributes

hallow plaza
#

and if it doesn't have a : ?

#

is it just an attribute with no value?

spring field
#

It should always have a colon. If it has no value, it will be blank or set to null

#

here's an example with both:

hallow plaza
#

I see it now. thanks again!

hallow plaza
#

Everything is working. Triggering automations on both double tap up and double tap down.

Can I ask a couple more questions to better understand what is going on under the hood?
This is my understanding:

the zwave swtich (the device) is sending out an event when it is double tapped. (Kitchen Lights fired Basic CC 'value notification' event for 'Event value': '255'). When the raw event is seen on the zwave "bus", the driver then triggers this in the home assistant "device". Is there a way to trigger an automation from this raw event from the device?

It seems that some where along the line, Home Assistant saw that event and automatically created an event Entity. An event entity is a construct of Home assistant and has nothing to do with z-wave?

So when the zwave event is triggered (as a state change of the entity) it gets routed to the new event entity and the device attributes are along for the ride so you can query them to determine the "state" of the atrributes at the time of the event state change?

void vale
#

The z-wave integration handles all communication with the z-wave network. Whatever is going on between those two is opaque and not something the user should be involved in.

When the z-wave integration decided that something happened, it can invoke a device based trigger.
It can also emit an event on the HA event bus. You can observe in developer-tools/events to see what kind of event is emitted.
The z-wave integration can also optionally create an event entity, and handle updating the state of that.

The event entity is supposed to be a more user-friendly way to interact with "events" in the system, it is somewhat duplicative with observing for manual events.