Compass Card - Points you in the right direction šŸ§­

Found the bug you stumbled upon.

Default entity for the indicator is sun.sun with attribute azimuth. When you select another entity from the list, the card does not clear the attribute. And the newly selected entity probably does not have an azimuth and thats why the indicator shows the default N.

Will fix this in an upcoming version.

Hey @tomvanswam, hi there.

Friendly reminder, Is there any progress and update about the font color on theme change?

Unfortunately not yet.
Iā€™m not sure what causes this, as Iā€™m not able to reproduce this.

Could you open an issue on the github page? Please add your config of the card, info on what themes you use?
This also helps me keeping this on my radar when I have a spare hour.

done with

1 Like

Just stumbled upon this gem. Really liking this card, thank you!

1 Like

Great stuff, @tomvanswam! Just discussed with my kids that itā€™d be cool to have wind visualized with a compassā€“here it comes :wink:

North offset is awesome: now I can adjust the compass to match orientation of the display. Is it possible to put a custom image on the background? It could be a top overview of the house. So it would be nice to see, which windows wind actually goes.

I especially loved sun azimuth. However, it might be sensible to show it only when sun is actually above the horizon. Itā€™s a little bit weird to see sun on the North. Additionally, I think sun elevation could be integrated into the compass: putting circle closer to the center depending on the angle.

2 Likes

Thanks! Nice to hear the card is discussed with kids, I wish my kid is also interested in stuff like that when she grows up.

Adding a background is a good idea. If you could make a feature request on the github site, the request will stay on my radar.

It is already possible to hide the azimuth indicator at certain elevations, just use this piece of yaml for the azimuth inidcator:

indicator_sensors:
  - sensor: sun.sun
    attribute: azimuth
    indicator:
      type: circle
      color: orange
      show: false
      dynamic_style:
        sensor: sun.sun
        attribute: elevation
        bands:
          - from_value: 0
            show: true

This will hide the indicator for elevations less than 0.

Iā€™m less fan of changing the location of the indicator towards the inside of the circle tbh, so I hope the config above will also serve your needs well enough.

Thanks for the hint! Sorry, my faultā€“havenā€™t read that manualā€¦

I was wondering what are the options for the indicator object? Details on that are missing in the manual: there is a non-active link to (GitHub - tomvanswam/compass-card: A Lovelace card that shows a directional indicator on a compass for Home Assistant). Is it possible to use an mdi-icon as an indicator object?

Thanks for the heads-up on the link. No worries on not reading the manual. Iā€™ve been told itā€™s not that complete anyways :rofl:

Currently there are 3 types of indicators you can choose, all of which are shown in an example in the readme.

indicator_sensors:
  - sensor: sensor.wind_dir
    indicator:
      type: arrow_inward
  - sensor:  sun.sun
    attribute: azimuth
    indicator:
      type: circle
  - sensor: sensor.friends_direction
    indicator:
      type: arrow_outward

mdi support would be a nice feature I guess. Iā€™ll think about it, and how to implement it.

Iā€™m using the compass card for lightnings, add-on blitzortung.org and it works flawlessly. I have one little problem though, when there is no lightning activity (95% of the time) the add-on brings back ā€œunknownā€ in the azimuth entitiy and compass card falls back to default azimuth 0Ā°, north.

Since ā€œunknownā€ is not an integer or float value, the band filter doesnā€™t show any effect. As a result many times I have zero lightning in north which is a bit annoying.

Do you think itā€™s feasible to integrate a general filter for ā€œunknownā€ instead of the fallback to zero/north?

Good idea!

Would you be so kind to add a feature request on Github?

Yup, I can do so. Do you prefer feature requests in the issue or pr section?

When you also can provide the code change, I prefer the PR section :wink:

Otherwise the issue section will do, and you can add the enhancement label.

done with


but I canā€™t label it with enhancement.

Ah didnā€™t know that, but I added it already.

Iā€™m trying to use the compass card. But canā€™t get the wind direction to work, it keeps pointing North. Iā€™m on HA 2021.5.5.

I have the following configuration:
1

type: 'custom:compass-card'
indicator_sensors:
  - sensor: sensor.tuk_wind_direction
    indicator:
      type: arrow_inward
value_sensors:
  - sensor: sensor.tuk_wind_speed
language: nl

3

What could be the cause?

The sensor only works with numeric degrees (0-360) or cardinal directions abbreviated in English. Your sensor has the cardinal directions abbreviated in Dutch, so it displays the default north.

The direction abbreviation language is only for displaying the abbreviation, not for reading the abbreviation from the sensor.

Use the sensor.tuk_wind_direction_azimuth (enable in your configuration.yaml when needed) to get numeric values and use the card.

1 Like

Thanks for the fast response, it worked!

4

1 Like

How do I get the direction (ENE in your screenshot) larger?

You can do that with card-mod