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

Add active state for cover, input_boolean, group and device_tracker #2431

Closed
wants to merge 4 commits into from

Conversation

snowzach
Copy link

No description provided.

@snowzach snowzach changed the title Add state icons for covers and input_booleans Add active state for cover, input_boolean, group and device_tracker Jan 10, 2019
@@ -96,33 +96,33 @@ class HuiEntityButtonCard extends hassLocalizeLitMixin(LitElement)
.longPress="${longPress()}"
>
${
!stateObj
? html`
!stateObj
Copy link
Member

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

Copy link
Author

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.

Copy link
Member

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

Copy link
Author

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.

@@ -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})`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this change

Copy link
Author

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"],
Copy link
Member

@iantrich iantrich Jan 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphabetize on data-domain

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -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"],
Copy link
Member

@iantrich iantrich Jan 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphabetize on data-domain

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@bramkragten
Copy link
Member

bramkragten commented Jan 10, 2019

See #2398 and #1716

@snowzach
Copy link
Author

@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.

@balloob
Copy link
Member

balloob commented Jan 10, 2019

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.

@snowzach
Copy link
Author

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.

@balloob balloob closed this Jun 18, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants