A custom Lovelace card that displays an indicator in a circle for use with Home Assistant.
HACS (Home Assistant Community Store)
- Go to HACS page on your Home Assistant instance
- Select
Frontend - Press add icon and search for
compass - Select Compass Card repo and install
- Force refresh the Home Assistant page (Ctrl + F5)
- Add compass-card to your page
- Download the 'compass-card.js' from the latest release (with right click, save link as)
- Place the downloaded file on your Home Assistant machine in the
config/wwwfolder (when there is nowwwfolder in the folder where yourconfiguration.yamlfile is, create it and place the file there) - In Home Assistant go to
Configuration->Lovelace Dashboards->Resources(When there is noresourcestag on theLovelace Dashboardpage, enable advanced mode in your account settings, rand retry this step) - Add a new resource
- Url =
/local/compass-card.js - Resource type =
module
- Url =
- Force refresh the Home Assistant page (Ctrl + F5)
- Add compass-card to your page
-
Add the card with the visual editor
-
Or add the card manually with the following configuration:
type: custom:compass-card entity: sensor.wind_dir secondary_entity: sensor.wind_speed
type: custom:compass-card
entity: sensor.friends_direction
secondary_entity: sensor.friends_distancetype: custom:compass-card
entity: sensor.wind_dir
secondary_entity: sensor.wind_speed
compass:
indicator: arrow_inwardtype: custom:compass-card
entity: sun.azimuth
secondary_entity: sun.elevation
compass:
indicator: circleLeft image yaml:
type: custom:compass-card
entity: sun.azimuth
secondary_entity: sun.elevation
compass:
indicator: circle
show_north: trueRight image yaml:
type: custom:compass-card
entity: sun.azimuth
secondary_entity: sun.elevation
direction_offset: 15
compass:
indicator: circle
show_north: true| Name | Type | Requirement | Default | Supported | Visual Config | Description |
|---|---|---|---|---|---|---|
| type | string | Required | custom:compass-card |
v0.0.1 | ||
| name | string | Optional | v0.0.1 | ✓ | Card header | |
| entity | sensor | Required | none |
v0.0.1 | ✓ | Entity that is used to draw the indicator in the compass. Valid entity states are: number - (positive and/or negative, multiples of 360 are removed). string - only Cardinal directions in English (e.g. E of WSW) string - any string with numbers in it will use the numbers as direction for both indicator and display value (e.g. E (90.4) parsed to 90.4)Indicator direction is full range (not only the 16 cardinal directions) |
| secondary_entity | sensor | Optional | none |
v0.0.1 | ✓ | Entity to show under the direction in compass |
| direction_offset | number | Optional | 0 |
v0.0.1 | ✓ | Value to offset the indicator display with. (E.g. to create a relative north) |
| compass | compass object | Optional | v0.1.0 | → | Compass properties |
| Name | Type | Requirement | Default | Supported | Visual Config | Description |
|---|---|---|---|---|---|---|
| indicator | list item | Optional | arrow_outward |
v0.1.0 | ✓ | Type of indicator to display in compass following indicators are possible:arrow_outwardarrow_inwardcircle |
| show_north | boolean | Optional | false |
v0.2.0 | ✓ | Show an indicator at the northern side of the compass |
| language | language | Optional | v0.3.0 | ✓ | Show the abbreviation in the language configured in Home Assistant (default/empty), or configured language |
The following languages are supported:
| Language | Yaml value | Supported | Translated by |
|---|---|---|---|
| Dutch | nl |
v0.3.0 | @tomvanswam |
| English | en |
v0.3.0 | @tomvanswam |
| French | fr |
v0.3.1 | @andilge |
| German | de |
v0.3.0 | @rainer-geiger |
| Italian | it |
v0.3.0 | @matteofranceschini |
| Norwegian | no |
v0.3.1 | @hwikene |
| Portugese | pt |
v0.3.1 | @andilge |
| Polish | pl |
v0.3.2 | @porebas |
| Spanish | es |
v0.3.1 | @andilge |
Pick the language in the visual editor, or add it to yaml config.
Example for Portugese abbreviations (regardless of Home Assistant language setting):
type: custom:compass-card
entity: sensor.friends_direction
secondary_entity: sensor.friends_distance
compass:
language: pt- Additional entities to show on circle
- Background image
- Hide indicator in certain directions (to use the card to display the sun or moon's movement)
- Css options to change look & feel
- Cleanup unused boilerplate code
You can find me on the Home Assistant Community Site
And occasionally on the HACS and Home Assistant Discord
- @rsnodgrass for wind-compass-card, which gave me the idea to make this
- @iantrich for the boiler-plate card, which got me started
- @xixao for wind speed/direction css
- All the translators
Help me out for a couple of 🍻, a ☕ or legos!
Or clone, and create and a PR to help make the card even better.




