šŸ”¹ Fontawesome icons

Thereā€™s a generate.py script included. Change that a bit, and then run it in the correct folder and it will generate iconsets for you.

I donā€™t own the pro version, so I canā€™t say much more than thatā€¦

Hi @thomasloven
Thanks for this component.
It got me thinking that there has been a lot of demand in the past for custom icons - e.g. homebrew icons, philips hue icons etc
Would it be feasible for your script to be to altered to read a directory containing arbitrary community submitted SVGs and create the ha-iconset for them all?

Iā€™ve sumitted a few icons to MDI and got the included there eventually but its a major pain.
Also they stopped accepting submissions for logos - hence no node-red icon will ever be in MDI :cry:

Of course. Iā€™ve replied to the topic you linked.

@thomasloven Hi Thomas, any chance you could give a little more guidance on the usage of the generate.py script?

Iā€™ve downloaded the Pro files, unpacked into fontawesome/svgs/solid, copied generate.py into fontawesome/svgs and run with python generate.py but nothing happens. Iā€™ve very little experience with Python so am not clear what the instructions at the very end are telling me to do :blush: Thanks in advance!

Ah, think I worked it out, is this right?

python
execfile("generate.py")
with open("hass-fontawesome-solid.html", 'w') as out:
    make_file('solid', 'fas', out)

It generated a file at least :slight_smile:

Yeah.
The bottom-most lines - which are the ones that actually do something - are commented out to avoid accidents.
Youā€™ll have to edit the script before you run it. Or do what you did. That should work too.

1 Like

Thanks @thomasloven!

1 Like

Thanks for this!

I wanted to mention a quirk Iā€™ve come across in case someone else runs into this as well.
Iā€™ve tried it 3 or so times and it is consistent.

If I place the hass-fontawesome-solid.html file (its the only one Iā€™ve used so far) under <config>/www/icons/ it doesnā€™t work (at least not for me), except for the icon fas:lightbulb.

Iā€™ve been able to place the html file under one of <config>/www/, <config>/www/abc/, and <config>/www/icons/fontawesome/ and it works.

As for configuring the front end:

  extra_html_url:
   #- /local/hass-fontawesome-solid.html  #works
    - /local/icons/fontawesome/hass-fontawesome-solid.html #works
   #- /local/icons/hass-fontawesome-solid.html #does not work
   #- /local/abc/hass-fontawesome-solid.html   #works

That sounds very much like a caching issue.
https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins#clearing-cache

yes that was it. I did a Empty Cache and Hard Reload in Chrome before it would work.
Thanks!

Hello!
My name is Noobā€¦
Someone who can see what have I done wrong.
Cant get icons to show up in Lovelace Views.
Thx

Thatā€™s not at all where the README tells you to place the files, or what it tells you to put in extra_html_url. Try reading it again.

I didnt find the generate.py :wink:

Thatā€™s for the old version. The new one has a description of the process in the readme.
https://github.com/thomasloven/hass-fontawesome#can-i-use-this-with-my-pro-icon-set

1 Like

Hello,

I am running HA in a docker. Please ignore my ignorance as I dont know much about the ā€œnpmā€ stuff required to get the pro icons working. Can the pro icons be used when running HA in a docker?

Have a great weekend.
Ralf

Yes. But I donā€™t own the pro set, so I havenā€™t tried the method myself.

If you donā€™t have node installed, Iā€™d say the easiest way to do this would be to spin up a node container and do the compilation in that.

Not anymore working with HA 0.101.2. No icon displayedā€¦

Should be fixed now

Yes, fixed with release 1.20ā€¦

This custom integration has had some pretty major updates in the new 2.1.0 version.

Check it out!

1 Like

Hi Thomas, can it be duotone icons are not working on Safari?