Using labels to expose devices to Alexa

Hey!

I would like to take advantage of newly introduced labels to expose devices to Alexa. This would make more sense to me to be able to individually add them and to avoid to do so through configuration.yaml

A naive approach :sweat_smile:

What would you suggest?

1 Like

You can’t use templates there… for now your option would be to use your template in the template editor, copy the returned value, and paste that into your config.

I had the same idea, seems it won’t work.

My current thinking is to rename the entity IDs of whatever I want to expose, so I can have a config file that includes lights.alexa_* for example.

Are there any better options to be able to control what is exposed to alexa without editing the config file?

I was searching for the same, I feel we need to add a feature request so that you can add all entities with a given label automatically, would not go down that road and rename all entities to have an alexa in the name, that feels wrong, e.g. if you ever decide to remove an entity you need to rename the entity ID and then have to modify all places where it was used.

I share your opinion @fritzrichter, this is more a trick than a solution. I’m not really comfortable with homeassistant/core architecture but with some guidance I would be able to work on this kind of feature. I got plenty other usage for it :slight_smile:

If anyone is reading this and would like to pair programming it, please tell me :smiley: