-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Adding Gauge Card to Lovelace #1742
Conversation
|
@balloob Ex. climate.ecobee.attributes.current_temperature Allowing that as the entity and in the card splitting the entity from the attribute? - type: gauge
entity: climate.ecobee.attributes.current_temperature or - type: gauge
entity: climate.ecobee
attribute: current_temperature |
I'd go for the second alternative, simply because |
I'd rather see the
then:
Then you can also update the template to observe
Then in |
When using the above, the gauge data functions aren't getting called when the state obj changes. |
Did you define a computed |
The _computeStateObj is getting called and _stateObj assisgned Correctly |
Disregard previous comments as it now functions properly. May have been a caching issue. |
Demo page looks slick! |
this.$.title.className = 'not-found'; | ||
return 'Entity is non-numeric: ' + this._config.entity; | ||
} | ||
return this._config.title; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should reset the className
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw it's kinda a hack to have a _computeFunction have side effects, should actually be done in _stateChanged, however it's good enough for initial merge.
ha-card { | ||
--base-unit: 50px; | ||
height: calc(var(--base-unit)*3); | ||
position: relative; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add cursor: pointer
because the card is interactive.
Please open a PR to add the docs to the website. |
* Commiting Only needed Files. Adds Gallery Entry * Adding Attribute current_temperature to gallery entry config * Fixing code from review and updating gallery * Updating Gallery to show errors * Resolving Reviews and updating gallery * Deleting unused line * Minor changes * Address my own comments.
* Commiting Only needed Files. Adds Gallery Entry * Adding Attribute current_temperature to gallery entry config * Fixing code from review and updating gallery * Updating Gallery to show errors * Resolving Reviews and updating gallery * Deleting unused line * Minor changes * Address my own comments.
Adds a new card type
gauge
to the available cardsCard uses the Previously made Custom Card located here
Configuration Variables
gauge
sensor.my_temperature
Severity Variables
Example
Open to any advice on more efficient code and changes to the card. First pull request to any Repo.