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
Add active state for cover, input_boolean, group and device_tracker #2431
Conversation
@@ -96,33 +96,33 @@ class HuiEntityButtonCard extends hassLocalizeLitMixin(LitElement) | |||
.longPress="${longPress()}" | |||
> | |||
${ | |||
!stateObj | |||
? html` | |||
!stateObj |
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.
This file shouldn't have been changed
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.
The file or just those lines? My editor (vscode) decided to "fix" that.
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.
vscode lied to you. Get the 'Prettier - Code formatter' extension. There are some recommended plugins for this project that should be suggested when you open vscode at search @recommended
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.
I just fixed it by hand.
src/components/entity/state-badge.js
Outdated
@@ -92,7 +96,7 @@ class StateBadge extends PolymerElement { | |||
if (typeof brightness !== "number") { | |||
errorMessage = `Type error: state-badge expected number, but type of ${ | |||
newVal.entity_id | |||
}.attributes.brightness is ${typeof brightness} (${brightness})`; | |||
}.attributes.brightness is ${typeof brightness} (${brightness})`; |
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.
remove this change
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.
done
@@ -151,7 +151,11 @@ class HuiEntityButtonCard extends hassLocalizeLitMixin(LitElement) | |||
ha-icon[data-domain="light"][data-state="on"], | |||
ha-icon[data-domain="switch"][data-state="on"], | |||
ha-icon[data-domain="binary_sensor"][data-state="on"], | |||
ha-icon[data-domain="input_boolean"][data-state="on"], |
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.
alphabetize on data-domain
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.
done
src/components/entity/state-badge.js
Outdated
@@ -29,7 +29,11 @@ class StateBadge extends PolymerElement { | |||
ha-icon[data-domain="light"][data-state="on"], | |||
ha-icon[data-domain="switch"][data-state="on"], | |||
ha-icon[data-domain="binary_sensor"][data-state="on"], | |||
ha-icon[data-domain="input_boolean"][data-state="on"], |
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.
alphabetize on data-domain
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.
done
@bramkragten are you saying I should be using custom CSS? I am looking at this and the linked ticket I think are saying this should be done with themes. Themes don't seem to let you set the colors for groups (from what I've been able to see) and I have played around and it seems like injecting CSS doesn't seem to work. I would be fine if I could make these css changes myself but I'm not aware of a way to do so. |
As per linked PRs, we're not going to merge this right now, we need to make a decision how we want to deal with state icon colors first. |
Is there any way to include css to style the elements via a theme or even just css? That seems to be a drastic downside to styling with the shadow dom that if it's not a variable, you can't really style it globally from what I've seen. I've tried everything that I can think of in css and a little in javascript. |
No description provided.