Skip to content

Conversation

iantrich
Copy link
Member

@iantrich iantrich commented Feb 12, 2020

Breaking change

Proposed change

add state_color option to glance card and its entities, button card and state-icon element

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

type: glance
state_color: false
entities:
  - entity: light.ceiling_lights
    state_color: true
  - entity: light.ceiling_lights
type: entity-button
tap_action:
  action: toggle
hold_action:
  action: more-info
show_icon: true
show_name: true
entity: light.ceiling_lights
state_color: false
type: picture-elements
image: 'https://www.home-assistant.io/images/merchandise/shirt-frontpage.png'
elements:
  - type: state-icon
    entity: light.ceiling_lights
    state_color: false
    style:
      top: 50%
      left: 50%

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@iantrich
Copy link
Member Author

babel doesn't seem to like the nullish coalescing. fix that or revert?

@bramkragten
Copy link
Member

Yeah it should be added to Babel, like this:
yarn add --dev @babel/plugin-proposal-nullish-coalescing-operator
https://github.com/home-assistant/home-assistant-polymer/blob/dev/build-scripts/babel.js#L36

@bramkragten
Copy link
Member

#4876

@bramkragten bramkragten merged commit fb7fbf2 into home-assistant:dev Feb 17, 2020
@bramkragten
Copy link
Member

Please add documentation :-)

@bramkragten bramkragten mentioned this pull request Feb 17, 2020
@lock lock bot locked and limited conversation to collaborators Feb 18, 2020
@iantrich iantrich deleted the state_color-option branch February 19, 2020 04:08
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.

Support state_color:false to disable icon coloring based on state in all cards
4 participants