Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluid level card error with type gauge (at system start) #291

Closed
2 tasks done
AlainPeccable opened this issue Aug 25, 2023 · 19 comments
Closed
2 tasks done

Fluid level card error with type gauge (at system start) #291

AlainPeccable opened this issue Aug 25, 2023 · 19 comments
Assignees
Labels
bug Something isn't working

Comments

@AlainPeccable
Copy link

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue:
0.1.3

Last working release (if known):
Unknown

Browser and Operating System:
Windows 11 & Google Chrome

Description of problem:

After restart of HA one card including Gauges is displaying an error for the one using the Fluid Level background card. All other Gauge card are working fine. Editing the card (no need to save) resolves the issue until the next reboot of HA.

Error message:
image

In the below example all gauges are working fine except the last one which is embedded in Fluid Level:
type: vertical-stack
cards:

  • type: glance
    show_name: true
    show_icon: true
    show_state: false
    entities:
    • entity: binary_sensor.abri_citernes_grundfos
    • entity: binary_sensor.abri_citernes_pompe
    • entity: binary_sensor.citerne_niveau_haut
    • entity: binary_sensor.citerne_vide
      title: Citerne
      columns: 4
  • type: markdown
    content: |-
    Text explaining the values
  • type: horizontal-stack
    cards:
    • type: gauge
      entity: sensor.abri_citernes_adc
      name: ''
      max: 6
      needle: true
      severity:
      green: 2
      yellow: 1
      red: 0
    • type: gauge
      name: ''
      entity: sensor.citerne_mazout
      max: 100
      needle: true
      severity:
      green: 25
      yellow: 15
      red: 0
    • type: gauge
      name: ''
      entity: sensor.citerne_mazout_cm
      max: 180
      needle: true
      severity:
      green: 25
      yellow: 15
      red: 0
  • type: custom:fluid-level-background-card
    entity: sensor.citerne_mazout
    level_color:
    • 128
    • 19
    • 0
      card:
      type: gauge
      entity: sensor.citerne_mazout_l
      max: 3000
      needle: true
      severity:
      green: 800
      yellow: 400
      red: 0
      min: 0
      unit: L
@AlainPeccable AlainPeccable added the bug Something isn't working label Aug 25, 2023
@MrTheoW
Copy link

MrTheoW commented Sep 22, 2023

I have the same issue. But when I edit the card and turn the needle off/on it works again.

For me it's on all my devices. Desktop browser, android smartphone and android tablet.

@swingerman swingerman self-assigned this Mar 21, 2024
@DM-AU
Copy link

DM-AU commented Apr 16, 2024

I have the same issue.

@ildar170975
Copy link

@AlainPeccable

  1. What you posted is unformatted code which in general cannot be properly analysed.
  2. Posting an unrelated code distracts people from the issue. You posted 6 cards and only 1 card is related. Google "Minimal working example".

Here is a minimal test code:

type: custom:fluid-level-background-card
card:
  type: gauge
  entity: input_number.test_level_1
entity: input_number.test_level_1

image

@AlainPeccable
Copy link
Author

Hello,
This is from last year and in the meantime there has been a new release with which I don't have the issue anymore. The issue was not with the formatting as a simple edit without saving solved the issue after each restart of HA.

for me this is closed.

@ildar170975
Copy link

No, the issue still there:
image
And similar things may happen with other cards, like "card inside a custom field in custom:button-card".

@DM-AU
Copy link

DM-AU commented Apr 20, 2024

No, the issue still there: image And similar things may happen with other cards, like "card inside a custom field in custom:button-card".

Agreed. Absolutely not resolved and can easily replicate the issue exactly as described in original post.

image

@AlainPeccable
Copy link
Author

I created a new card just to test and indeed it still not work.

I'm not using the card as I was using it last year and I'm not having any issues anymore, all my cards are part of the "custom:stack-in-card"

If I simulate the same with the standard horizontal or vertical stack I also don't see the issue.

`
type: horizontal-stack
cards:

  • type: custom:fluid-level-background-card
    card:
    type: gauge
    entity: sensor_water_tank_percent
    needle: true
    severity:
    green: 50
    yellow: 15
    red: 0
    entity: sensor_water_tank_percent
    level_color:
    • 51
    • 177
    • 255
      `

So yes there is still an issue but also a workaround.

@AlainPeccable AlainPeccable reopened this Apr 20, 2024
@AlainPeccable
Copy link
Author

AlainPeccable commented Apr 20, 2024

I created a new card just to test and indeed it still not work. Now I'm not using the card as I was using them last year all my cards are part of the "custom:stack-in-card"

If I simulate the same with the standard horizontal or vertical stack I also don't see the issue.

type: horizontal-stack
cards:
  - type: custom:fluid-level-background-card
    card:
      type: gauge
      entity: sensor_water_tank_percent
      needle: true
      severity:
        green: 50
        yellow: 15
        red: 0
    entity: sensor_water_tank_percent
    level_color:
      - 51
      - 177
      - 255

image

@swingerman
Copy link
Owner

Yes it brakes. Looked into it on Friday but wasn't able to fix it. Please stay tuned.

@swingerman
Copy link
Owner

I think it should be fixed. I will publish a new beta today.

@swingerman
Copy link
Owner

Please check v0.1.6-beta.5

@AlainPeccable
Copy link
Author

Tested with the test card created 2 weeks ago and working for me. And all my existing dashboards looks also ok.

@ildar170975
Copy link

With the latest release, I do not see the "custom element does not exist" error.
But the whole card may be not displayed:

type: custom:fluid-level-background-card
card:
  type: gauge
  entity: input_number.test_level_1
entity: input_number.test_level_1

A sequence:

  1. Create a new card, paste this code.
  2. The card is shown in Editor:
    image
  3. Save the card & cLose the Editor.
  4. The card is still shown:
    image
  5. Refresh a page (F5 in Chrome).
  6. The card is not shown:
    image
  7. How to fix: open the card in Editor & close the Editor -> the card is shown again (until you press F5).

A similar in yaml-mode dashboard:

  1. After F5 the card is not shown.
  2. How to fix: select "Refresh" from a HA menu -> the card is shown again (until you press F5).

Not sure if I should create a new issue.
With another card I do not see the problem:

type: custom:fluid-level-background-card
card:
  type: entity
  entity: input_number.test_level_1
entity: input_number.test_level_1

@DM-AU
Copy link

DM-AU commented May 3, 2024

I am still having issues. If I refresh enough the card will load or if I just choose to edit the card it will render, however I also have 2 errors which appear and change when I refresh:

Error 1:
error 1

Error 2:
error 2

type: custom:fluid-level-background-card
card:
  type: gauge
  entity: sensor.water_tank_percent
  needle: true
  severity:
    green: 50
    yellow: 15
    red: 0
  name: House
entity: sensor.water_tank_percent
level_color:
  - 61
  - 180
  - 240
tap_action:
  action: more-info

@ildar170975
Copy link

ildar170975 commented May 3, 2024

@DM-AU have you cleared a browser's cache?
Any chance you are still using a prev version?

@DM-AU
Copy link

DM-AU commented May 3, 2024

@DM-AU have you cleared a browser's cache? Any chance you are still using a prev version?

Sorry, you were right I didnt update (i had selected the beta version in HACS but didnt update).

Status: No more errors. However I have the same issue as ildar170975 where the card is now completely invisible. The only way to bring it to view is to edit the card which renders it.

@swingerman
Copy link
Owner

Please check v0.1.6-beta.6

@ildar170975
Copy link

ildar170975 commented May 13, 2024

Tested after update (2024.5.3, Chrome, Win10):
Two cards in "storage mode" dashboard:

type: custom:fluid-level-background-card
card:
  type: entity
  entity: input_number.test_level_1
entity: input_number.test_level_1
type: custom:fluid-level-background-card
card:
  type: gauge
  entity: input_number.test_level_1
entity: input_number.test_level_1

Usually are shown as
image

But sometimes after F5 (~25% cases):
image

I see a similar behaviour with many custom cards.
I.e. could be not a fluid-card issue...

@DM-AU
Copy link

DM-AU commented May 13, 2024

I have tested on an iPad, and 2x Windows computers using Edge and it is now displaying/working correctly. I will monitor and update if any changes. Thankyou for resolving!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

5 participants