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

Attribute condition missing from Dashboard visibility #22215

Closed
4 tasks done
Stutchbury opened this issue Oct 3, 2024 · 3 comments
Closed
4 tasks done

Attribute condition missing from Dashboard visibility #22215

Stutchbury opened this issue Oct 3, 2024 · 3 comments

Comments

@Stutchbury
Copy link

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

The Conditions documentation show 'attribute:' as a valid label for numeric state conditions but in Dashboard Cards and Badges, this label is ignored.

Describe the behavior you expected

As per the Conditions documentation, when 'attribute:' is used in visibility conditions for Cards and Badges the specified attribute is used to compare Above/Below rather than the Entity value.

Steps to reproduce the issue

  1. Create a Badge in any Dashboard
  2. Select the 'Visibility' tab
  3. Add an 'Entity Numeric State' condition
  4. Press 'SHOW CODE EDITOR'
  5. Add 'attribute: below the entity line
  6. Save

What version of Home Assistant Core has the issue?

2024.10.0

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefos 115.04

Which operating system are you using to run this browser?

Debian 12

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

There is a brief discussion here: #21550
bus as there is a mismatch between documentation and functionality, I thought it appropriate to raise an issue.

@karwosts
Copy link
Contributor

karwosts commented Oct 3, 2024

That documentation is for automations.

The documentation for dashboard conditionals is here, and it does not mention attribute: https://rc.home-assistant.io/dashboards/conditional/#state

I believe this may be intentional, as I have seen many developer comments that they generally want to move away from using attributes and instead having more sensors. So I think any new development of attribute related features is discouraged.

@Stutchbury
Copy link
Author

Thank you for your reply and link to the 'alternative' conditions for Dashboards. Like most, I suspect people will search for 'Home Assistant conditions' and end up where I did.

I sincerely hope this is not intentional - an entity can currently have many attributes that would never normally be displayed but are essential for conditions. UI conditions are likely to be particularly reliant on non-visible attributes.

If the intention is to limit the use of attributes to values that are defined during configuration (such as UoM) and to move attributes that are set/changed at runtime to sensors, that would be logical but needs a roadmap - and the future usage of attributes communicated to developers.

@karwosts
Copy link
Contributor

As this is not an issue but a feature request (and covered appropriately by #21550), I will close this issue ticket.

@karwosts karwosts closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2024
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