Best way to use physical switches with devices?

Hey guys!

I have two Fibaro dimmer 2 modules that have 2 spare inputs (one each). These two inputs is being used to control my window blinds. Or at least that is what I am trying to do.

But I am not sure what’s the best way to do it. Having 2 automations (one for up and one for down) just seems so messy?

So what I did was to create one automation that I call “physical button script” where I can add as many buttons as I want. BUT, right now I have to click the button twice for it to work… Is there any better way (and preferably clean) to link these buttons to the qubino blind controller?

This is my automation in case I have done it wrong:

alias: "Automation: Physical button scripts"
description: ""
trigger:
  - platform: device
    type: turned_on
    device_id: c12f3e2de32cf36d9859269123768e04
    entity_id: light.lys_stue_2
    domain: light
    id: livingroom-up
  - platform: device
    type: turned_on
    device_id: a1ea7885e25fc54182fe5b7cdc782f9b
    entity_id: light.lys_kjokken_2
    domain: light
    id: kitchen-down
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: livingroom-up
        sequence:
          - type: turn_on
            device_id: 4915e9a65c20f0eebb602ee9f4d9bfee
            entity_id: switch.gardiner_stue
            domain: switch
      - conditions:
          - condition: trigger
            id: kitchen-down
        sequence:
          - type: turn_off
            device_id: 4915e9a65c20f0eebb602ee9f4d9bfee
            entity_id: switch.gardiner_stue
            domain: switch
    default: []

I think your automation looks ok. If you want to cleaner yaml code you might wish to try use entity state as trigger instead of device. But both works similarly.

Have you checked how your buttons are configured under Z-Wave? Is you inputs defined as mono-stable switch type or bi-stable switch type?