aukedejong / lovelace-windrose-card

Home Assistant Lovelace Windrose Card
60 stars 2 forks source link

Card may not be displayed (observed in Edit mode) #39

Closed ildar170975 closed 2 months ago

ildar170975 commented 12 months ago

1.2.1 2023.7.0 When a dashboard is in Edit mode, the windrose-card may not be displayed. This is a very weird issue - please read it carefully.

Code for a view:

  - theme: ''
    title: test_panel_1
    path: test_panel_1
    badges: []
    cards:
      - type: vertical-stack
        cards:
          - type: history-graph
            entities:
              - sun.sun
      - type: custom:windrose-card
        title: Wind direction
        wind_direction_entity:
          entity: sensor.home_gismeteo_wind_bearing
        windspeed_entities:
          - entity: sensor.home_gismeteo_wind_speed
            name: Home
        data_period:
          hours_to_show: 24

How the view is supposed to look:

image

The windrose-card in Editor:

image


And now about the problem:

  1. Switch the current dashboard to the Edit mode.
  2. Add 2 new cards (history-graph, windrose-card - see a code above).
  3. Both cards are displayed:

image

  1. Refresh the page (F5 in Chrome) - the windrose-card is NOT displayed:

image

Pressing F5 does not help.

  1. Leave Edit mode - the windrose-card is still NOT dispalyed:

image

  1. Refresh the page - the windrose card is displayed:

image

  1. Switch to the Edit mode - the windrose-card is displayed:

image

  1. Refresh the page - - the windrose-card is NOT displayed:

image


I see same in Chrome & FF (Win10):

image

image


What I managed to see in Code Inspector (Chrome):

image


Why "history-graph"? I realized this config as a minimal working example. Use "history-graph" w/o "vertical-stack", or place in to the stack "entities card" instead of "history-graph" - then the "windrose-card" is displayed properly...


I do not see the issue in the iOS Companion App (iPad Air 2, iOS 15.x).

ildar170975 commented 12 months ago

Same observed with a markdown card instead of history-graph.

aukedejong commented 12 months ago

Hi Ildar, I did some tests and could reproduce it. Strange issue. I don't think it's a windrose-card bug.

Is it correct that there is only a problem if you refresh (F5) in Edit mode?

ildar170975 commented 12 months ago

@aukedejong Thanks a lot for testing!

I got a feedback from @karwosts (a very responsive developer) here: https://github.com/kalkih/mini-graph-card/issues/984 He said it could be a Frontend issue, more time is needed to investigate. Unfortunately, I am not confident to raise an issue in Frontend github.

Update - he registered an issue: https://github.com/home-assistant/frontend/issues/17266 Hope more Frontend developers investigate it.

Is it correct that there is only a problem if you refresh (F5) in Edit mode?

Yes, I see no problems in "non-edit" mode. Also, seems that yaml-mode is OK too.

aukedejong commented 12 months ago

Just read the mini-graph-card issue you linked. Looks like kalkih is an expert. I'm also not that confident.

Thanks for the update.

ildar170975 commented 12 months ago

kalkih

Unfortunately, he is not as active as it was for last 1-2 years... I myself suspended many activities due to family issues.

aukedejong commented 2 months ago

I'll close this issue and link to this one: https://github.com/home-assistant/frontend/issues/17266