Creating a blueprint from automation

Hi there,

I’m spending hours trying, reading, watching youtube … without success. Hope someone here can help me !

As first exercise, I’m trying to convert in blueprint an automation that binds a wireless “smart knob” dimmer with a wall dimmer (and of course the dimmable ceiling lamp wired to it).

So, here is the YAML of the automation acting with three triggers of the device “Variateur bureau” (device_id e5f9a7af75da1b37299601699691f3ea) on actions “single” (single push), “rotate_right” and “rotate_left”.

The actions act on the wall dimmer device_id 568afbf4e579b2860507b736f5de3049, entity_id: a1615c80d69b112be9870806892e681a.

My blueprint problem if of courts the !inputs … I need to select the device “Variateur …” and the action (single, rotate_right, rotate_left), and the target light and the action (toggle, increase, decrease). How do I do that ?

Thanks in advance !

alias: Bind variateur bureau
description: "Action du variateur sans fil sur la lampe de plafond"
# Les déclencheurs
triggers:
  - domain: mqtt
    device_id: e5f9a7af75da1b37299601699691f3ea
    type: action
    subtype: single
    trigger: device
    alias: Boutton
    id: variateur_bureau_toggle
  - alias: Lumiere up
    domain: mqtt
    device_id: e5f9a7af75da1b37299601699691f3ea
    type: action
    subtype: rotate_right
    trigger: device
    id: variateur_bureau_up
  - alias: Lumiere down
    domain: mqtt
    device_id: e5f9a7af75da1b37299601699691f3ea
    type: action
    subtype: rotate_left
    trigger: device
    id: variateur_bureau_down
# Les actions
conditions: []
actions:
  - choose:
# Allumer / éteindre la lampe en appuyant une fois
      - conditions:
          - condition: trigger
            id:
              - variateur_bureau_toggle
        sequence:
          - type: toggle
            device_id: 568afbf4e579b2860507b736f5de3049
            entity_id: a1615c80d69b112be9870806892e681a
            domain: light
        alias: Allumer / Etindre
# Si elle est éteinte, allumer la lampe en tournant à droite
      - conditions:
          - condition: trigger
            id:
              - variateur_bureau_up
          - condition: device
            type: is_off
            device_id: 568afbf4e579b2860507b736f5de3049
            entity_id: a1615c80d69b112be9870806892e681a
            domain: light
        sequence:
          - type: turn_on
            device_id: 568afbf4e579b2860507b736f5de3049
            entity_id: a1615c80d69b112be9870806892e681a
            domain: light
            brightness_pct: 40
        alias: Allumer si éteint
# Si elle est allumée, augmenter l'intensiité en tournant à droite
      - conditions:
          - condition: trigger
            id:
              - variateur_bureau_up
        sequence:
          - device_id: 568afbf4e579b2860507b736f5de3049
            domain: light
            entity_id: a1615c80d69b112be9870806892e681a
            type: brightness_increase
        alias: Augmenter
# Si elle est éteinte, réduire l'intensité en tournat à gauche
      - conditions:
          - condition: trigger
            id:
              - variateur_bureau_down
        sequence:
          - device_id: 568afbf4e579b2860507b736f5de3049
            domain: light
            entity_id: a1615c80d69b112be9870806892e681a
            type: brightness_decrease
        alias: Diminuer
mode: single

Did you follow these steps?

While youtube tutorials can be handy, they go out of date quickly and this is easier to follow along as you dont have to pause.

Yes thanks, but belive me, I’ve read this, and many other, but didn’t solve my case :sob:

Device triggers are meant for new users and basic uses… I don’t know that they’re compatible with what you are trying to do in a blueprint.

You could use trigger selectors in the blueprint to instantiate to triggers, but they would need to be manually assigned the required ID to work with your Choose action criteria. Since the Device trigger you are using is essentially just an abstraction of the MQTT trigger, you might be able to use other data available from a MQTT trigger in the Choose instead… but it will probably be easier to figure out how to create the automation using MQTT triggers in the first place, then go from there with the blueprint.

1 Like