aukedejong / lovelace-windrose-card

Home Assistant Lovelace Windrose Card
60 stars 2 forks source link

Blank screen and error in browser console #53

Closed jezinke closed 3 months ago

jezinke commented 5 months ago

I just installed the windrose-card 1.4 in HA 2023.1.3 and have this behavier:

grafik

The card shows blank and the entity is definitely correct as I can add it to any other lovelace card with success.

grafik

Any help appreciated.

ildar170975 commented 5 months ago

Post a minimal code reproducing this error.

jezinke commented 5 months ago

This is my config type: custom:windrose-card title: Wind direction data_period: hours_to_show: 1 max_width: 400 refresh_interval: 300 windspeed_bar_location: bottom windspeed_bar_full: true wind_direction_entity: entity: sensor.gw2000b_wind_direction direction_unit: degrees use_statistics: false direction_compensation: 0 windspeed_entities:

this is the resource manager

grafik

this is what the card looks like

grafik

No log entries regarding this card, just installed via hacs, added to card to a dashboard and entered the config. Thank you for taking care.

ildar170975 commented 5 months ago

The code you posted is unformatted. You could have noticed it yourself. It will be really hard (may be even impossible) for people to analyse it. Compare your post with other issues here.

Another point is that you should test (& post then) with a MINIMAL code which reproducing the error. This code does not seem to be minimal. So, this is a leaving the testing for others.

jezinke commented 5 months ago

This is the code which shows up after including the card. I only inserted the entities for direction and speed and the speed unit. nothing else. Here a screen print of the code. It comes in 2 parts, split at line 15. What would be a MINIMAL code?

grafik grafik

ildar170975 commented 5 months ago

Here a screen print of the code.

People may want to reproduce your issue in their setups. Screenshot cannot be copy/pasted as yaml.

Suggest to edit the 1st post with a formatted code, then we'll remove other posts to make this thread tidy.

I only inserted the entities for direction and speed and the speed unit. nothing else.

I see, then let's consider this as a minimal.


This code

type: custom:windrose-card
title: Wind direction
data_period:
  hours_to_show: 4
max_width: 400
refresh_interval: 300
windspeed_bar_location: bottom
windspeed_bar_full: true
wind_direction_entity:
  entity: sensor.home_gismeteo_wind_bearing
  direction_unit: degrees
  use_statistics: false
  direction_compensation: 0
windspeed_entities:
  - entity: sensor.home_gismeteo_wind_speed
    speed_unit: auto
    use_statistics: false
output_speed_unit: mps
speed_range_beaufort: true
windrose_draw_north_offset: 0
cardinal_direction_letters: NESW
matching_strategy: direction-first
center_calm_percentage: true

which was made automatically after adding the card - I only added sensor.home_gismeteo_wind_speed & sensor.home_gismeteo_wind_bearing. image No errors in Code Inspector (Win10, Chrome), only expected messages like "WARN Speed unavailable at timestamp 1705537362.773888 is not a number."

jezinke commented 5 months ago

solved the problem. entities had not been in the recorder include. Might be good to note in the instruction that entity date is taken from history. Many with a raspberry don't record all entities automatically to save sd card lifetime. Thank you.