This is a dotnet 5.0 program that generates iconsets compatible with Home Assistant after 0.110 (https://developers.home-assistant.io/blog/2020/05/09/custom-iconsets/). It is designed to support Font Awesome icons (V5 and V6), but should be easily extendable to other SVG files.
Only tested in Linux, but should work on other platforms.
If you are looking for free/open iconsets check the js
folder first. This project already has generated files for a few of those.
For all other iconsets, the easiest way to use this app is to use one of the already provided configuration files.
- v5-free.conf.json: Free V5 version of FontAwesome
- v5-pro.conf.json: Pro V5 version of FontAwesome
- v6-pro.conf.json: Pro V6 (currently alpha) version of FontAwesome
- simpleicons.conf.json: Configuration for the simpleicons project.
- Make sure you have dotnet core 5.0 installed https://dot.net
- Download the Desktop version of FontAwesome (free or pro).
- Unpack the SVG folder in
icons/v{5|6}-{free|pro}
- Run
dotnet run v{5|6}-{free|pro}.conf.json
- Generated files will be inside the
js
folder
To process other svg iconsets, a custom config file can be used:
{
"outputPath": "js/v5-pro", // Where should the generated JS files be written.
"iconsets": [ // An Array of iconsets to generate.
{
"directory": "icons/v5-pro/brands", // The path in which the .svg files can be found
"name": "fab" // The name of the generated iconset. Used both for the js file and the ha prefix
}
]
}
- Add the generated files to the config/www folder.
- Reference them as Lovelace resources. URL: http://{homeassistant-url}/config/lovelace/resources
- Done!
I'm looking to port the HASS custom component by thomas-loven
to add automatic support to HA. Pull requests welcome