vbPhil Posted April 5, 2023 Posted April 5, 2023 When I press a button on a KeyPadLinc in-wall dimmer switch HA see a state change, like from off to on, as reported in the Logbook. When I view the entity for the button its history is showing changes from 0 to 255. The entity id is sensor.mb_mirror_d_heater so it sees the buttons as sensors. The problem I'm having is detecting either in a script or automation when the button is changing from off to on. If I just trigger on a state change with no values it reacts to that. I'd like to know what direction it's going like off to on or on to off. What type of Action do I use in the script or automation?
vbPhil Posted April 6, 2023 Author Posted April 6, 2023 (edited) 1 hour ago, vbPhil said: When I press a button on a KeyPadLinc in-wall dimmer switch HA see a state change, like from off to on, as reported in the Logbook. When I view the entity for the button its history is showing changes from 0 to 255. Oopps. It wasn't the keypadlinc button I was seeing in the Logbook but the Insteon switch that the keypadlinc button was turning on and off. But, it is the button's history that shows it changing between 0 and 255. Edited April 6, 2023 by vbPhil
shbatm Posted April 6, 2023 Posted April 6, 2023 You should use the control events for triggers from buttons: https://www.home-assistant.io/integrations/isy994/#handling-insteon-or-other-isy-control-events Note: the documentation shows everything in the event_data, but you only need to use the entity_id (sensor.mb_mirror_d_heater) and the control you want to listen for (e.g. DON) 1
vbPhil Posted April 6, 2023 Author Posted April 6, 2023 2 hours ago, shbatm said: You should use the control events for triggers from buttons: https://www.home-assistant.io/integrations/isy994/#handling-insteon-or-other-isy-control-events Note: the documentation shows everything in the event_data, but you only need to use the entity_id (sensor.mb_mirror_d_heater) and the control you want to listen for (e.g. DON) Thanks for the help, that works pretty well. I should have found that in the documentation, but it was looking like it wasn't going to be easy and documented. Would have stumbled upon it but the "event type" in the trigger setup was not a drop-down of available values so you had to really know what would work there.
Recommended Posts