I would like to have the following button as optional, but I can’t figure out what should be the default value in the blueprint so this device can be optional (not selected).
Device: IKEA TRÅDFRI shortcut button
Available entities: battery, identify, LQI and RSSI
Working automation when the existing device_id is set in the default value:
It seems that HA expects valid device_id from the dictionary, therefore setting the default value to any of the following doesn’t work when the device is not selected:
I have checked the trigger with the UI and verified that the default: is what is causing the blueprints without button defined to become unavailable. When I select the device in these blueprints, the automation becomes available and works. When I remove that device again and save the changes, I get: Message malformed: Unknown device"
It seems like that the device can’t be empty.
I assume that I don’t have to do e.g. something like this in the trigger for the device_id: