Hi.
I have a Namron 8-button switch I want to use for different things, it can send these actions:
on_l1,
off_l1,
brightness_move_up_l1,
brightness_move_down_l1,
brightness_stop_l1,
on_l2,
off_l2,
brightness_move_up_l2,
brightness_move_down_l2,
brightness_stop_l2,
on_l3, off_l3,
brightness_move_up_l3,
brightness_move_down_l3,
brightness_stop_l3,
on_l4,
off_l4,
brightness_move_up_l4,
brightness_move_down_l4,
brightness_stop_l4.
This is an example of a automation that is working:
alias: zigbee_23 brightness_move_up_l4
description: ''
trigger:
- platform: state
entity_id: sensor.zigbee_23_action
to: brightness_move_up_l4
condition: []
action:
- device_id: 77080b1c0cf655a8134c458efeb35d46
domain: light
entity_id: light.zigbee_24
type: brightness_increase
mode: single
But here I try to use 4 different actions to do 4 different things, (dim up, down, turn off and turn on), it will not work, and I can not se why. Can it be that the “action” is changed back before the automation has processed the options in it?
alias: zigbee_23 - All Functions
description: ''
trigger:
- platform: state
entity_id: sensor.zigbee_23_action
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: sensor.zigbee_23_action
state: on_l4
sequence:
- type: turn_on
device_id: 77080b1c0cf655a8134c458efeb35d46
entity_id: light.zigbee_24
domain: light
- conditions:
- condition: state
entity_id: sensor.zigbee_23_action
state: brightness_move_up_l4
sequence:
- device_id: 77080b1c0cf655a8134c458efeb35d46
domain: light
entity_id: light.zigbee_24
type: brightness_increase
- conditions:
- condition: state
entity_id: sensor.zigbee_23_action
state: off_l4
sequence:
- type: turn_off
device_id: 77080b1c0cf655a8134c458efeb35d46
entity_id: light.zigbee_24
domain: light
- conditions:
- condition: state
entity_id: sensor.zigbee_23_action
state: brightness_move_down_l4
sequence:
- device_id: 77080b1c0cf655a8134c458efeb35d46
domain: light
entity_id: light.zigbee_24
type: brightness_decrease
default: []
mode: single
light.zigbee_23 = the wall-witch
light.zigbee_24 = a lamp