Compass Card - Points you in the right direction 🧭

Very nice. I like the simplistic approach, and really like how you can use track multiple things. I will use this every weekend.

What would be nice, and this is not something I think is possible at the moment, would be if you could use your phones compass as a sensor in the App. So that you’d know where north was. Most of the time it’s obvious, but still would be pretty cool.

1 Like

I’m trying to see a situation where opening home assistant and all its baggage to view a compass would be more efficient than just opening a compass app. Help me out here.

1 Like

cool, thanks!

1 Like

It would be cool if the lovelace card was tied to a real compass. So when you show wind from the east, you could point your phone to the north so you’d know where the east was. I was not saying I want a compass itself in HA. I was saying if I had a compass in HA, I could overlay other direction related information on top of that compass. I do think that’s a bit much to ask though. More of a, wouldn’t that be cool

1 Like

Hi, where do you get the information for the entities:
sensor.wind_dir
sensor.wind_speed
sun.azimuth
sun.elevation

from?

Honestly they are placeholders, just to show what you could do with the card.

However, different weather integrations will hook you up with sensors for wind speed.
As for the sun, what I personally did is make some template sensors to get the azimuth and elevation from the default sun entity in Home Assistant. Here is the yaml to put in your configuration.yaml for that:

sensor:
  - platform: template
    sensors:
      solar_angle:
        friendly_name: "Elevation"
        unit_of_measurement: '°'
        icon_template: "mdi:axis-y-rotate-clockwise"
        value_template: "{{ state_attr('sun.sun', 'elevation') }}"
      solar_azimuth:
        friendly_name: "Azimuth"
        unit_of_measurement: '°'
        icon_template: "mdi:axis-z-rotate-clockwise"
        value_template: "{{ state_attr('sun.sun', 'azimuth') }}"     

Then you can use sensor.solar_elevation and sensor.solar_azimuth in your card.

Extra note, the sun entity only gives valid values for your location when you set the correct location in the Configuration->General settings.

2 Likes

Do you have any info on your astro panel @tom_l, e.g. how the season, moon phase, astro dawn/dusk are obtained? Tried looking for a astro component in HA and HACS, but didn’t have much luck! Thanks in advance :+1:

Season, moon phase are in core of HA. For other Astro stuff look for Phil Bruckners sun2 custom component (not in HACS as default but can be added as a repo)

3 Likes

For some obscure reason the entities-card and glances-card (and maybe more) use the card-header class, and the entity-card and sensor-card (and maybe more) use the header class.
In the default theme, the first is black, less weight and taller, and the latter is gray, bolder and smaller.

I thought all header titles would be the same (card-header class), so I changed the card to that when fixing the overflow. However the request was made to revert the header to match the sensor card header so I did, it made sense to me as the card is more a sensor kind of card.

Consider this a heads-up on a possible broken header for your theme in v0.3.0 :wink:
If it does, reach out and we can see what is a good way to get it right.

1 Like

That’s fine. I noticed last update and just applied a different card-mod style class I already had defined. I can easily change it back. Thanks for the warning.

1 Like

Hey Tom… did the pointer direction change by default in the latest version? Mine is now pointing IN and before it pointed OUT… I think IN is correct anyway… (if the wind is ‘E’ it is blowing FROM the East not to the East right?)

You’re totally right!

However, version 0.0.1 only had the outward pointing arrow, and from version 0.1.0 onward the indicator is selectable (outward, inward, circle). As the first version only was outward, i kept that the default.
If you already changed it to inward and after upgrading it reverted back to outward, then that’s a bug.

I never touched it. It was always configured like this:

          - type: 'custom:compass-card'
            entity: sensor.bom_gosford_wind_direction
            secondary_entity: sensor.bom_gosford_wind_speed_kmh
            direction_offset: 0
            name: Wind Direction

The direction has changed with this update.
image

1 Like

No not for me. But I was playing with the options a while ago and actually have the pointer I want specified:

class: top-level-card
compass:
  indicator: arrow_outward
direction_offset: 0
entity: sensor.bom_hobart_wind_direction
name: Wind Direction
secondary_entity: sensor.bom_hobart_wind_speed_kt
type: 'custom:compass-card'

It should not have, I’ll see if i can reproduce this.
Could you update to 0.3.0 (if you haven’t already)? And see if the default still is inward for you? Then i can try to fix it in the latest version.

That is my config for the latest version and also screenshot.
I don’t define it and it points in now…

1 Like

Can confirm. The default arrow direction is inward if it is not defined.

2 Likes

I’ll look into it.

Found it, fixed it in v0.3.1.
Waiting on a partial review for that update before the version is released.

1 Like

Nice UI, can you share a bit more information how to get this setup?