Lovelace Windrose Card

Released v0.6.0
Changes:

  • Added config speed_range_step and speed_range_max to customize the speed ranges. Default depend on output speed unit.

Released v0.7.0
Changes:

  • Full custom speed ranges with custom colors. Example in the readme.

This options is not working with the default output speed unit Beaufort. So you need to explicitly define an output speed unit other then Beaufort.

1 Like

Released version 0.8.0
Changes:

  • Added config windrose_draw_north_offset if you want the north direction not pointing to the top of your screen.
1 Like

Released version 0.8.1
Changes:

  • Fix: on some browsers when resizing (changing orientation) the wind rose is not drawn with the correct height.
1 Like

Released version 0.9.0
Changes:

  • when output speed unit is Beaufort (bft) the speed ranges are fixed per input speed unit. Before the speeds where converted to meters per second. Now every input speed unit has it’s own speed ranges. Source: then English wikipedia Beaufort page.
1 Like

Released version 0.9.1
Changes:

  • Fix: mod_card works. finally.,

@tom_l
I hope your gradient background works now.

1 Like

It does! Thank you very much.

1 Like

Thank you @aukedejong. This is awesome. Working with knots and two wind inputs. No card mods yet and I still have to work out my data collection status!

Released version 0.10.0
Changes:

  • Colors are now configurable
2 Likes

Is the same with my card, all values are NaN!

It might have to do with this:
I did install with HACS, not manual what I used to do, but that is getting more and more a hassle.

What I find is this:

If I go into manage resources I see, the folder where the lovelace windrose .js is stored this is-
/hacsfiles/lovelace-windrose-card/windrose-card.js?hacstag=5912706960100

butmaybe I do not know where to look so I googled it and it says the HACS folder is in www/community, whenever i go there and look there is no such folder, maybe it is hidden maybe ???

What I see in my www/community is a new folder lovelace-windrose-card which i would expect, but I do not dare change the resource in the resource manager to point to this address for that would mean the auto update from HACS will get broken.

So what is wisdom?
And is this what make all my values go NaN%

Nope that did not work either!

@jayjay If you can see the windrose, then your resource setting is correct.

Can you share a screencapture?
And are there errors in the browser console? Press F12 to display the console.

Sure here is the screenshot, in the browser console, I am lost no idea where to look and for what, for what I saw there are no errors.

type: custom:windrose-card
title: Wind richting
hours_to_show: 4
max_width: 400
refresh_interval: 300
windspeed_bar_location: bottom
windspeed_bar_full: true
wind_direction_entity: sensor.buienradar_wind_direction
windspeed_entities:
  - entity: sensor.buienradar_wind_speed
    name: Windsnelheid
wind_direction_unit: degrees
input_speed_unit: kph
output_speed_unit: kph
direction_compensation: 0
windrose_draw_north_offset: 0
cardinal_direction_letters: NOZW
matching_strategy: direction-first
direction_speed_time_diff: 1

And the error I found now is this one:

TypeError: “x” is (not) “y”

The JavaScript exception “x is (not) y” occurs when there was an unexpected type. Oftentimes, unexpected undefined or null values.

Message

TypeError: Cannot read properties of undefined (reading ‘x’) (V8-based) TypeError: “x” is undefined (Firefox) TypeError: “undefined” is not an object (Firefox) TypeError: undefined is not an object (evaluating ‘obj.x’) (Safari) TypeError: “x” is not a symbol (V8-based & Firefox) TypeError: Symbol.keyFor requires that the first argument be a symbol (Safari)

I did a retry removed the not working card and redid it, now the bar at the bottom gives information in percentage but the windcircel still the same got a new error though… this one when you click the more option you still get that X <-> Y error.

Hello jayjay
I have the Wind rose installed and working since yesterday.
First I made one mistake: Using the wrong entities.

Using the following working code:

type: custom:windrose-card
title: Windmeter Buienradar
hours_to_show: 12
max_width: 500
refresh_interval: 60
windspeed_bar_location: right
windspeed_bar_full: true
wind_direction_entity: sensor.br_wind_direction_azimuth
windspeed_entities:
  - entity: sensor.br_wind_force
    name: Laatste 24 uur
wind_direction_unit: degrees
input_speed_units: kph
output_speed_unit: kph
direction_compensation: 0
matching_strategy: speed-first
cardinal_direction_letters: NOSW
direction_speed_time_diff: 3600
card_mod:
  class: top-level-card

Im curious what happens if you use:
sensor.br_wind_direction_azimuth and:sensor.br_wind_force

Andre

It is not fully there yet but it does show a winddirection now, thank you so much. So it needed a gradient number, and does not work with NOZW, good tip thank you so much Andre!

You can set the wind_direction_unit parameter to letters. Then the card accepts letters like: N, NE, SW up to 32 directions. But not the Dutch variants, so NO or ZW wil not work.

Howto do that, tried that with the English letters but then I got that error. Got it found an example in here :grinning_face_with_smiling_eyes:

Nope letters did return the error, I stick to Andre’s setup, with the Azimuth as base that one works!

2 Likes

A thought I had from what you said Auke, it works with English letter notation, and that is the error, buienrader does provide NOZW as base and all in between, which will not work with the English notation, there lies the problem, so I could work around making a template sensor and rewriting the letters produced from buienradar to their English equivalents! That probably will do the trick, for whoever likes to try :slight_smile:

1 Like

Released version 0.11.0

Changes:

  • output speed unit name can be changed to support different languages.

Release 1.0.0

Breaking config changes:

The easiest way to update, is add the card to a dashboard and change the generated default configuration.

New features:

  • Option to disable the center calm percentage and show the first speed range.
  • Statistics data can now be used for winddirection and windspeed entities. Not all entities support this.
  • Windspeed unit is automatic detected, see readme. Depends on the unit_of_measurement attribuut of the entity.
    If your windspeed entitiy uses an unit_of_measurement that’s not recognized, please let me know. You can always configure the speedunit your self.
  • Log level configurable, level INFO can give you some more information about measurement counts and speed units detected.

Changes:

  • Beaufort is not a speedunit any more. It more like a speed range option. It can be turned on with a separate property. The Beaufort speed ranges depend on the output speed unit.
  • Wind direction speed matching logic changed:
    • When NOT using statistics, when matching a speed to a direction, the matched speed is the last measurements before the measurement time of the direction.
      So also when you get speed updates once in an hour and direction updated every second, machtes can be found.
      The direction_speed_time_diff property is not used anymore.