I’m trying to build a blueprint that given an input device will find a specific entity_id under that device and use it in an action. With all the other (hopefully) unrelated stuff the blueprint boils down to:
Replacing the action with a log message it seems to log the correct entity_id so it’s not that it has the wrong id/no id.
Is there any way to get around this other than adding another input for the screen entity?
If nothing else will work I’ll just add the input but that’s mildly annoying and I’m all about wasting hours of time to eleminate mild annoyances (mostly sarcasm…)
The output of a template like that is a string. You need to convert that to an entity.
Someone correct me if I’m wrong but I think that is the expand command…
I’ve only used it once so I don’t really remember…
I quickly tried throwing expand in the template and same thing. In my attempt to Google something else I came across this post where petro mentions that:
You can’t use a template in the entity_id field for a state condition.
Which I thought was conclusive but later in the same there is this link that shows an example that is very similar to what I’m trying.
Maybe you can’t do it in blueprints? I’m a bit confused
I ended up recreating what I expected the blueprint to generate as an automation and ended up with the same behaviour. After some experimentation it seems like you can’t use variables for entities like that, probably because the validation is trying to validate an actual entity id. In the link I posted previously that is specifically for a service call. I decided to change my blueprint to use a service call with the variables and it works now. A bit unituitive as a blueprint noob but happy it works.
The final working solution: