jimz011 / homekit-infused

Homekit Infused 5 2023
https://jimz011.github.io/homekit-infused/
Other
873 stars 137 forks source link

One more idea that I use! #4

Closed kraineff closed 5 years ago

kraineff commented 5 years ago

In ui-lovelace.yaml you can use this: decluttering_templates: !include_dir_named lovelace/templates

And in lovelace/templates folder simply name files that you want it to be used in decluttering-card template. D993A609-4B5F-4E95-8DB6-1C8BE26F4BE8

kraineff commented 5 years ago

It’s more easy and no need to make 2 different names and create decluttering-templates.yaml file

jimz011 commented 5 years ago

A great idea. Once I have the time again I will take a look at this.

Though where does it get the template name from to use in variables? Or do you set the name in each file at the top?

kraineff commented 5 years ago

The name of the template is a name of File.

From HomeAssistant site: !include_dir_named will return the content of a directory as a dictionary which maps filename => content of file.

kraineff commented 5 years ago

Example: 40CD0EF6-049D-4C1C-9A4D-18F53C5BC5C3 59F4B662-7D5A-481E-A827-FC3EC86BD3DB

I named energy-usage as it should use in template, and the file completely yours without changes.

jimz011 commented 5 years ago

Thank you, I will close this issue. Implemented in 0.12.3