#Multi sensor button.

1 messages · Page 1 of 1 (latest)

opal frost
#

Hi vert new to HA and I have the following code as I want to create a multi sensor card. If I put this code in the raw configuration from the UI it works as expected but what I would like to do is put it in a seperate yaml file and include it. This just does not seem to work.

Someone did tell me that this is not actually a tamplate but a partial frontend configuration and this has to go into the raw configuration file only.

So my question is can I put the code into it's own seperate file or can it only go in the raw configuration file and if I can put it in a seperate file how do I do this.

Also what I am actually trying to do is create a card to launch me docker apps but has 2 to 4 sensor information on that card as well. Would just like to know if this is the best way to do that or is there a better way.

Thanks for any responses in advance.

hard night
#

Someone did tell me that this is not actually a tamplate but a partial frontend configuration and this has to go into the raw configuration file only.

So my question is can I put the code into it's own seperate file or can it only go in the raw configuration file and if I can put it in a seperate file how do I do this.
It looks like you've set up a configuration template for a custom:button-card. If you're using the UI to design your dashboard, then the template has to go in the Raw Configuration and you cannot use !includes.
If you want to use !includes (and YAML anchors), you'll need to use a YAML-based dashboard. (You can copy everything from the Raw Configuration into the new YAML file.) Just be aware that a YAML-based dashboard cannot be edited within the UI; you have a use some sort of text editor such as VSCode.
Take a look at Adding more dashboards with YAML particularly the section with "You can also add YAML dashboards when your main dashboard is UI configured:" This way you can both run UI-based and YAML-based dashboards. (Tip: you can use a UI-based dashboard to help with setting up/designing a card and take the corresponding code and drop it in the YAML-based dashboard.)