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

Hide when unavailable #183

Open
Markyt77 opened this issue Sep 9, 2024 · 1 comment
Open

Hide when unavailable #183

Markyt77 opened this issue Sep 9, 2024 · 1 comment

Comments

@Markyt77
Copy link

Markyt77 commented Sep 9, 2024

Building on issue #60 would it be possible to expand this so that I can hide individual bars when the sensor becomes 'unavailable' or 'unknown'? I tried with card-mod/css ({% if states("sensor.altherma_climatecontrol_leaving_water_temperature") in ['unavailable','unknown'] %}) but couldn't get that it work

@jopocop
Copy link

jopocop commented Dec 1, 2024

I have a bar with a scale of 0...100 (%). I created a template sensor that is equals to the real entity value, except in situations I want to hide the bar, I'll just force the template sensor to be 101. And in frontend I use the following colorcoding.

              severity:
                - color: Red
                  from: 0
                  to: 50
                - color: Green
                  from: 51
                  to: 100
                - color: Black
                  from: 101
                  to: 102
                  hide: true

However, this just broke. I did upgrade to the latest HA Core, but have no idea if that is related to this error. In any case the hide: true does not work any more.
Edit: It works, but only after page refresh.
Edit2: card-templater was the reason. Bar-chart can't hide/unhide if within card-templater. --> Solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants