Hey guys,
I have a question, I get stuck over and over again and don’t find a solution, even not with the official documentation.
I want to change an automation to a blueprint. In my automation I use as trigger devices
trigger:
- platform: device
domain: mqtt
device_id: 7b355db79f6c0c795eec22734e49c750
type: action
subtype: "on"
discovery_id: 0x84ba20fffec79587 action_on
- platform: device
domain: mqtt
device_id: 7b355db79f6c0c795eec22734e49c750
type: action
subtype: brightness_move_up
discovery_id: 0x84ba20fffec79587 action_brightness_move_up
- platform: device
domain: mqtt
device_id: 7b355db79f6c0c795eec22734e49c750
type: action
subtype: "off"
discovery_id: 0x84ba20fffec79587 action_off
Now I want to use the device option as input in a blueprint. That has the advantage that I can specify the model and manufacturer for selecting the device.
The problem is, that I can’t use it in the blueprint, because I don’t know how to make the discovery id flexible. The test blueprint is only usable with the one button with that discovery id.
The blueprint looks for testing like that:
blueprint:
name: Test
description: This blueprint is for test
domain: automation
input:
button:
name: button
description: Choose Button
selector:
device:
manufacturer: IKEA
model: TRADFRI shortcut button (E1812)
multiple: false
mode: restart
max_exceeded: silent
trigger:
- platform: device
domain: mqtt
device_id: !input button
type: action
subtype: "on"
discovery_id: 0x84ba20fffec79587 action_on
id: "on"
- platform: device
domain: mqtt
device_id: !input button
type: action
subtype: brightness_move_up
discovery_id: 0x84ba20fffec79587 action_brightness_move_up
id: "long"
- platform: device
domain: mqtt
device_id: !input button
type: action
subtype: "off"
discovery_id: 0x84ba20fffec79587 action_off
id: "off"
For now I use as trigger the state instead of device, but with that I don’t know how to specify the selector, so that it only shows entites from e.g. IKEA?
Maybe someone can help me with that or just tell me, that it’s impossible in the moment.
Thanks a lot.