- HACS tab > Menu > Custom Repository
- Paste this repo's URL
- Select Integration in the dropdown
- Install custom_symbols from HACS
- Restart Home Assistant
- Home Assistant > Settings > Integrations > Add > Custom Symbols > Install
- Add your own svg files to folder /config/custom_symbols
The icons should be usable in Home Assistant now. If it doesnt show up, try refreshing the page, private browsing or restart Home Assistant.
- Copy
custom_components/custom_symbols
into your custom_components folder - Restart Home Assistant
- Home Assistant > Settings > Integrations > Add > Custom Symbols > Install
- Add your own svg files to folder /config/custom_symbols
The icons should be usable in Home Assistant now. If it doesnt show up, try refreshing the page, private browsing or restart Home Assistant
- Supports Home Assistant's icon picker (2021.11.0+)
- Replace icon by name, configure in settings menu
- Only one example SVG file included, please use our own files
- Rendering Modes
- Monochrome
- Hierarchical #h
- Palette #p
- Multicolor #m
- Variable Color #h20 , #20
- Prefix: cs
- Suffix: #[mode[value]]
- Eg:
- SVG files in config/custom_symbols:
- bed.double.svg
- ha.svg
- cs:bed.double | cs:ha#h | cs:ha#40 | cs:ha#m40
- SVG files in config/custom_symbols:
The rendering is inspired by Apple: SF Symbols.
The easiest way to create svg files is the SF Symbol App and an prepare script.
Class names define how the element should be rendered.
An name has this parts
[mode]-[order]:[color]#clear%[break point]
. Everything after order is optional
Mode key words
- monochrome
- multicolor
- hierarchical (used for palette too)
Break point defines until which value in percent the object should be semi transparent.
Clear is only used for variable color rendering to clear the background under the transparent object.
Attention: At least the monochrome class is required!
Eg included ha.svg:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="2.38 -90 108 108">
<path class="monochrome-0 multicolor-0:cyan hierarchical-0:tertiary" fill="#55BEF0" d="M20 …"/>
<path class="monochrome-1#clear%0 multicolor-1:white%0 hierarchical-1:primary%0" fill="#FFFFFF" d="M56 …"/>
<path class="monochrome-2#clear%34 multicolor-2:white%34 hierarchical-2:primary%34" fill="#FFFFFF" d="M45 …"/>
<path class="monochrome-3#clear%68 multicolor-3:white%68 hierarchical-3:primary%68" fill="#FFFFFF" d="M74 …"/>
</svg>
The colors for palette and multicolor can be overwritten with css variables in your theme
- cs-primary: currentColor
- cs-secondary: var(--primary-color)
- cs-tertiary: var(--accent-color)
- cs-base: var(--primary-text-color)
- and for each multicolor:name
- cs-name: [fill value]
The SVG is parsed and only the d attribute is transfered to a new path node. The class and fill attribute only define the style of a generated path.
- Does not work together with other icon libs which modify custom icon rendering. Eg. hass-fontawesome