šŸ”¹ 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.

Thanks @thomasloven!

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

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!

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