Lovelace Windrose Card

Thanks Auke. I thought I was keeping up with the changes. :flushed:

I have fixed the depreciated options but I think the real fix was changing the matching strategy to “full-time”. This particular location only updates every 10 minutes at most (both direction and speed), often a lot less, and I think that was what was skewing the output when using “direction-first”.

type: custom:windrose-card
title: Wind Rose
data_period:
  log_measurement_counts: false
  period_selector:
    location: bottom
    active_color: white
    active_bg_color: var(--secondary-text-color)
    buttons:
      - hours: 4
        title: 4 hr
      - hours: 8
        title: 8 hr
      - hours: 24
        title: 24 hr
        active: true
      - hours: 168
        title: 7 days
max_width: 400
refresh_interval: 300
windspeed_bar_location: bottom
wind_direction_entity:
  entity: sensor.casey_wind_direction
  direction_unit: letters
  use_statistics: false
  direction_compensation: 0
windspeed_entities:
  - entity: sensor.casey_wind_speed
    name: " "
    speed_unit: knots
    output_speed_unit: knots
    speed_range_beaufort: false
    use_statistics: false
    windspeed_bar_full: true
speed_ranges:
  - from_value: 0
    color: "#93abca"
  - from_value: 5
    color: "#039BE5"
  - from_value: 10
    color: "#63e686"
  - from_value: 15
    color: "#0da035"
  - from_value: 25
    color: "#e0b400"
  - from_value: 35
    color: "#ff8000"
  - from_value: 45
    color: "#e45e65"
  - from_value: 60
    color: "#ff4754"
  - from_value: 80
    color: "#b200ff"
background_image: /local/background/casey.png
windrose_draw_north_offset: 0
direction_labels:
  cardinal_direction_letters: NESW
matching_strategy: full-time
current_direction:
  show_arrow: true
  arrow_size: 40
center_calm_percentage: true

I’m now seeing what I expect:

2 Likes

Released version 1.19.0

Finally implemented a feature requested back in 2023. It was a big one, needed a lot of code changes.
If you encounter bugs, please let know by reporting a github issue.

Feature:

  • Show current wind speed arrow on the legend bars, implements #49
    Add this config to a windspeed entity block:
    current_speed_arrow: true

Fixes:

  • When not showing all speed ranges in the legend bar (windspeed_bar_full: false), render_relative_scale did not work.
  • Refactored bar render code.

2 Likes

This is great, I just implemented it! Is there any way to have a setting to tell it to appear on the other side of the bar so that it does not sometimes cover the label?

Example (I would love it if the arrows were on the other side of the bar pointing upwards!):

Released version 1.19.1

And the first bugfix already.

Fixes:

  • The second windspeedbar used the wrong speed unit converter.

@KruseLuds
Can you open a feature request on GitHub?

Here’s the feature request:

1 Like

New release version 1.20.1

(update, 1.20.0 contained a small bug, was only the latest version for max 30 minutes.)

Feature:

  • Using compass auto rotation, it’s now also possible to use it as heading direction instead of north direction. Thanks @alnavasa
    compass_direction:
      auto_rotate: true
      as_heading: true
      entity: input_number.compass
    

Fixes:

  • Added speed unit alias mi/h for auto recognition.
  • Made speed unit recognition case-insensitive.
1 Like

New release version 1.21.0

Features:

  • Text sizes in speed bars configurable, fixes #132
  • Current speed arrow location can now also be rendered on the other side of the bar, fixes #139

Fixes:

  • Refactoring dimension calculation code, fixes #143
  • When using more than 16 rose leaves, render the space between the leaves smaller.
  • When there is no history data returned by HA, a clear error message is logged in the console.
1 Like

New release version 1.21.1

Fix:

  • Top margin for corner info label text increased. Thanks @mloraas
    The higher letters didn’t fit.
1 Like

Can you explain me the use of the input.number.compass and how to have it?

@KruseLuds
The size of the percentages on the rose configurable. That can be added.
I’m not sure it’s a feature request yet. Can you add it on GitHub?

@maurizio53
This option is used by people on for example a boat.
The windrose will rotate depending on the heading of the boat.

About the input_number, I’m using a helper, because I don’t have a real compass available in Home Assistant.
You can create helpers in Settings > Devices & services > Tab: Helpers.

2 Likes

New release version 1.22.0

Sorry for the shorts time since the previous release. I think it’s important to get this change public, because of the new HA version 2025.4

Features:

  • Hold action support. Fixes #146
  • Support for new state_class for directional sensors.
    Since HA 2025.4 the new state class measurement_angle is introduced.
    With this change we have long term statistics (LTS) for wind direction sensors.
    Looks like this LTS data needs to build up, before you get any data.

Yes of course but i need direction, not speed, how can i do that?

Hi,
I had a look at your previous messages. You want to use a weather entity right?
You can do that now, since the card has attribute support. No need to create template entities anymore.

wind_direction_entity:
  entity: weather.somewhere
  attribute: wind_bearing
windspeed_entities:
  - entity: weather.somewhere
    attribute: wind_speed
    name: Speed
    speed_unit: auto
    output_speed_unit: kph
    windspeed_bar_full: false
    speed_range_beaufort: false
    current_speed_arrow: true

Released version 1.23.0

Feature:

  • Animated rendering of the windrose leaves and the windbars. (can be disabled)
  • Wind speed compensation using a factor or shift. Fixes #138
  • Circle percentages text size configurable.

Fixes:

  • Speed label space calculation fix when using vertical speed bars.
3 Likes

Released version 1.23.1

Fixes:

  • Cropping of speed labels in certain conditions when using vertical bars.

And another bugfix release, version 1.23.2

Fixes:

  • Touch actions not working correctly for the speed bars.
1 Like

text spacing bug…

Not using a relative scale could fix this.

windspeed_entities:
  - entity: sensor.wind_speed
    render_relative_scale: false

Or using vertical bars:

windspeed_bar_location: right

Make the percentage texts smaller, will make them unreadable.

Do you know an other solution?

Windrose was the reason for me to install HACS and start tweaking.

Using Ecowitt GW2000a with WS90. Everything seems smooth and correct.

Thank you for this great “add-on”.

2 Likes

Released version 1.23.3

Fixes:

  • Current direction arrow position fixed.
  • Fixed error in console when not using actions. Fixes #154 #155
    Thanks Failure404 and amordicus