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

Is there a way to flip the W and E so If you rotate the compass to the direction your house is facing they will render correctly?
Sun Compass

Itā€™s on my to-do list :slight_smile:

1 Like

Great, thanks for all the work, on your time on this. I really appreciate it.

1 More question. Iā€™m trying to self educate on this and see some compass cards have removed the top direction heading that is auto generated. The W for west in my image above. Do I use card mod to remove that? I havenā€™t been able to fing, or more likely I overlooked an example someone has posted where that has been done specifically or it was just part of there mod where they were showing something else?

Iā€™m not quite sure what you mean to achieve.

Could you provide an example mock-up image (e.g. done in paint)?

I figured it out, be reading the thread again and messing with it. Just have to edit the HTML to get the display how I want.

Thanks for the reply

1 Like

@tomvanswam, I am very grateful for your compass card and have incorporated it into dashboards intended for use on a sailboat, as seen here. Node-RED has made it feasible to get data from the NMEA data bus with which all modern instruments communicate, and HA is proving a very versatile platform to display and log everything.

I wonder if you would consider a rather unique use case: Apparent Wind Angle, AWA.

When sailing, wind direction is presented in two ways: 1) True Wind Angle as a 360 degree compass direction and 2) Apparent Wind Angle relative to the direction of travel as 0-180 degrees Left or Right. Typically looks like this.

Presently, I am converting True Wind Angle to a 0-360 number to make it compatible with your compass card. When the direction is Right, I pass the sensor value. When the direction is Left, I pass 360-sensor.value.

Also, has there been any discussion about adding a sensor.device.class for compass direction in HA?

Thanks for the kind words and a screenshot of how youā€™re using the card. :wink:

Someone already opened a feature request also related to a nautical usecase. So you could add another feature request for this second nautical usecase. It wonā€™t be at the top of my list, but when I get to it Iā€™ll implement it.
It might take some time to get to this though, as there is quite a backlog of other bugfixes and features for me to work on, and only so little time.

I didnā€™t hear anything about a sensor class for cardinal directions, but then again, Iā€™m also not keeping track on that.

I would love to see a screenshot of your solution and think of a way to configure what you want, instead of tweaking HTML.

Astroweather integration adds a moon azimuth sensor.

1 Like

Just to follow up on my post. Using the Astroweather integration I have added the moon position so I now can see both. It looks like this and the YAML is below.

image

type: custom:compass-card
indicator_sensors:
  - sensor: sun.sun
    attribute: azimuth
    indicator:
      type: circle
      color: orange
      dynamic_style:
        sensor: sun.sun
        attribute: elevation
        bands:
          - from_value: 0
            show: true
  - sensor: sensor.astroweather_moon_azimuth
    indicator:
      type: circle
      color: black
      dynamic_style:
        sensor: sensor.astroweather_moon_phase
        attribute: elevation
        bands:
          - from_value: 0
            show: true
value_sensors:
  - sensor: sun.sun
    attribute: elevation
    units: Ā°
    decimals: 1
compass:
  circle: null
  north:
    show: true
    color: red
  east:
    show: true
  west:
    show: true
  south:
    show: true
5 Likes

Hi, I send data from my windmeter via MQTT to HA.

When I try to use the compass card, the arrow does not move.
What am I doing wrong?

I think you should remove the attribute: azimuth line.
If that does not work, please post the result of the Developer Tools ā†’ States Tab page, when filtering on sensor.meteo_wind_richting. Then I can see if the format of the sensor or one of its attributes could be used for the indicator sensor.

Dank je Tom.

The removal of azimuth worked!

1 Like

Hi Tom, would you like to share your background imges that you use in your theme?
It looks really nice!

Sorry I have not used background images for a while and I no longer have them. Now I use a gradient fill instead.

I kept them for debugging puroses.

You can find them here:
Dashboard background day
Per card background day
Dashboard background night
Per card background night

And config files for the themes:
Day theme
Night theme

Disclamer, I havent checked the correct working of the theme yaml files for some time, so they might be broken with current Home Assistant version or Card-Mod version.

What card are you using for your graphing data?

Thank you!