Hey guys,
I am trying to write an automation that lets me use the A and B buttons of my 6 button KeypadLinc to increase and decrease the brightness of the light connected to it. Here is the automation I have:
alias: Ceiling Fan Light Brightness
description: ''
trigger:
- platform: state
entity_id:
- switch.keypad_with_dimmer_4b_60_64_button_a
- switch.keypad_with_dimmer_4b_60_64_button_b
action:
- service: light.turn_on
data:
entity_id: light.keypad_with_dimmer_4b_60_64_main
brightness_step_pct: >-
{{ 10 if trigger.to_state.entity_id ==
'switch.keypad_with_dimmer_4b_60_64_button_a' else -10 }}
mode: single
The automation is working fine when I am in toggle on/off mode for the buttons, but I would like to change the button mode to off only so that it flashes on when I press it but then turns back off. When I do that the automation then becomes unreliable. I was hoping somebody might have some insight as to why.