TheRydad Posted May 10, 2022 Posted May 10, 2022 This might be better suited in the HA forums, but there have been good answers in here before so I figured I'd give it a shot. I am trying to figure out how to trigger an automation in HA with a keypad linc button press. I tried the YAML below, but it isn't firing the automation. "b1g1t8_unassigned" is the sensor name for the button I want to use. Any guidance is much appreciated. platform: event event_type: isy994_control event_data: entity_id: sensor.b1g1t8_unassigned control: "DON" value: 255
MrBill Posted May 10, 2022 Posted May 10, 2022 The easy way to do this, on the ISY side add the single KPL button to a Scene all by itself. Then either restart Home Asisstant, or reload the Universal Devices integration. You'll find the scene created as a switch in HA. You can then trigger an automation using "state", the 'switch.' entity for the scene, and from 'off' to 'on' (no capitals on on and off). No template sensor needed. Using this method you can also turn the button on or off using "Call Service" and switch_turnon or switch_turnoff. You could also create a template sensor, like you were attempting, but you probably need to use 'state' instead of 'event' and 'on' or 'off'. I'd have to play with it if you want to get that to work and still can't, but it should work. The drawback to that method is that you can't control the button from the HA side. The only way you can have HA turn the button on or off is to use the scene method above.
TheRydad Posted May 10, 2022 Author Posted May 10, 2022 Thanks, @MrBill. That makes sense. I had actually played around with creating a scene with just the one device like you mentioned so I could test within ISY, but didn't think about using that scene on the HA side. I'll mess with that later this afternoon. (If anyone cares, I am trying to automate some motorized blinds that are controlled by Somfy MyLink and integrated into HA.)
MrBill Posted May 10, 2022 Posted May 10, 2022 33 minutes ago, TheRydad said: (If anyone cares, I am trying to automate some motorized blinds that are controlled by Somfy MyLink and integrated into HA.) I used it for the same thing... zigbee (but not Somfy) blinds. 1
shbatm Posted May 10, 2022 Posted May 10, 2022 Here's my working example. Loose the value line. trigger: - platform: event event_type: isy994_control event_data: entity_id: light.art_light control: DFOF
TheRydad Posted May 11, 2022 Author Posted May 11, 2022 Thanks for everyone's help. It turns out after some digging, I was having some comm problems with my Insteon network. I need to do a little more testing, but it appears to be from a dimmer module I added last weekend. I was also not setting up the automation correctly, but once I realized that the even scene and KPL button status change weren't even being seen by the ISY, I realized the problem was further upstream. I then realized the ISY wasn't seeing any traffic not initiated by the PLM. After finding some of @MrBill's replies to some threads related to that, I was able to figure out what was going on. I also got really lucky- as my daughter was going to bed, she mentioned that her reading lamp wasn't turning on. I pulled out the dimmer module last night and this morning when I was removing it from the Insteon network to add a new one for her, I happened to look over at the event viewer window and noticed the ISY was seeing traffic again. @MrBill Thanks for the tip on creating an Insteon scene to use in HA. That seems like it is going to allow me to do a lot more things with the state of the Insteon button used to initiate the automation. Like being able to turn it back off because of a third party action, for example. 1
Recommended Posts