hass-fontawesome/README.md
2019-11-26 09:38:14 +01:00

2.9 KiB

hass-fontawesome

hacs_badge

Use free icons from the fontawesome set in Home-assistant.

Installation instructions

  • Install using HACS (Or copy the contents of custom_components/fontawesome/ to <your config dir>/custom_components/fontawesome/.)

  • Restart Home Assistant

  • Go to your integrations configuration and add FontAwesome Install

  • Open the settings for the new FontAwesome integration

  • Click the Options gear (red arrow below) and select which icon sets to load Options

Icon sets

The icons are divided into three sets.

  • Solid
  • Regular
  • Brands

Each set will add a few hundred kilobytes to the ammount of data that's downloaded to your browser every time you open up your Home Assistant interface, so to save on your data plan, make sure to only select the ones you actually need.

Usage

Find the icon you want in the gallery.

The three icon sets have different prefixes: fas:, far: and fab: respectively.

So,

  • to get a solid heart, use fas:heart
  • to get a heart outline, use far:heart
  • to get the twitter symbol, use fab:twitter

The icons are useable anywhere in Home Assistant - not only in lovelace.

FAQ

Can I use this with my Pro icon set?

Yes you can, but you'll need to build things yourself.

  1. Get your personal token first.

Go to https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers and find your token. The command will look like this:

$ npm config set "@fortawesome:registry" https://npm.fontawesome.com/ && \
  npm config set "//npm.fontawesome.com/:_authToken" XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  1. Clone this repository and modify it to build with the fontawesome-pro icons. This will also build the duotone and light series.
$ git clone https://github.com/thomasloven/hass-fontawesome
$ cd hass-fontawesome/
$ git apply < fontawesome-pro.patch
$ npm install && npm run-script build

Note that the duotone serie doesn't seem to work correctly yet in Home Assistant, since all colors are mapped to one color.

  1. Copy the output of custom_components/fontawesome/ to you Home Assistant installation.

Can I set this up in configure.yaml instead?

Yes.

fontawesome:
  regular:
  solid:
  brands:

Just remove the lines for the icon sets you don't want.


Buy Me A Coffee