Can entities be configured trhough YAML files?

Not sure if someone asked this before but can entities be configured using YAML instead of the UI? I have seen some posts using platform but could not find any docs for this and not sure how far I can get with this kind of configuration for devices

1 Like

Yes they can, you need to know how to populate them, though. Are you thinking of sensors?

And if you want to create entities based off of other entities and/or data;

You can look through the Examples page for various configurations in .yaml, such as;

1 Like

Some can, some can’t.

That’s odd because all integrations that can configure their entities via YAML explain it (often with examples) in their documentation.


This seems to be one of the more overlooked pieces of the documentation, but is really the heart of it

The trouble is a new user is often confronted by lots of autodiscovered devices that are configured in the GUI, and never has to look at much docs.

When I first used HA I learned by reading the docs right through, and looking at almost every integration doc page. Admittedly there were a lot less of them then. (And they were called components!)

1 Like

Reypm claimed “could not find any docs for this”. With all due respect to reypm, it exists and it’s not all that difficult to find.

For example:


While your search is correct I was hoping that integrations add more docs about this topic, for example, this LG Soundbars integration tells exactly nothing about how to configure this entity through YAML and sometimes is easier for me do it that way, that’s what I am talking about but anyways I am gonna read what you guys posted here and if I can’t make it work then I will come back here and ask for some help.

Because that integration does not support configuration by yaml. A lot of integrations don’t and never will as explained in the link I posted above.


It has been explained, by at least three users, that an integration’s documentation indicates if it supports configuring entities via YAML when it actually supports it. If it doesn’t include any references to YAML then, obviously, it doesn’t support YAML configuration. For example, the documentation for LG Soundbars explains you add soundbars via the UI. There’s no mention of YAML configuration because it doesn’t support it.

1 Like

not really, my question is because I have set up localtuya and now I need to add a parameter and that cannot be done without first removing the device setup, which will break automation and will make my HA unstable, and then re-adding the device back which is a PITA sometimes. If I had YAML on these entities would be easier just add a new parameter and maybe restart the HA instance.

Localtuya is a third party integration.

You need to discuss with the developer of that integration if you want new features or better documentation.

You do that here: Issues · rospogrigio/localtuya · GitHub

1 Like