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

0.105: state_color does not work with entity-filter card #4807

Closed
1 task
tdejneka opened this issue Feb 8, 2020 · 7 comments
Closed
1 task

0.105: state_color does not work with entity-filter card #4807

tdejneka opened this issue Feb 8, 2020 · 7 comments
Labels
Bug Current Bug in UI - Extra Attention

Comments

@tdejneka
Copy link

tdejneka commented Feb 8, 2020

Checklist

  • [x ] I have updated to the latest available Home Assistant version.
  • [x ] I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

The problem

Whereas state_color works with the entities card it does not with entity-filter.

Expected behavior

Screenshot from version 0.103.2:
Screenshot from 2020-02-08 08-15-42

Screenshot from version 0.105.1:
Screenshot from 2020-02-08 08-16-56

Steps to reproduce

Edit ui-lovelace.yaml and add state_color: true to an entity-filter card. Refresh Lovelace UI.

Environment

  • Home Assistant release with the issue: 0.105.1 (Docker)
  • Last working Home Assistant release (if known): 0.103.2
  • UI Type (States or Lovelace): Lovelace
  • Browser and browser version: Firefox 72.02
  • Operating system: Ubuntu 18.04.3 LTS

Problem-relevant configuration

    cards:
      - type: vertical-stack
        cards:
          - type: conditional
            conditions:
              - entity: binary_sensor.laundry_door
                state: 'off'
            card:
              type: entity-filter
              state_color: true
              entities:
                - binary_sensor.laundry_door_lock
                - lock.laundry_door_lock
              state_filter:
                - "on"
                - locked
                - unlocked

Javascript errors shown in your browser console/inspector

Additional information

@tdejneka tdejneka added the Bug Current Bug in UI - Extra Attention label Feb 8, 2020
@homeassistant
Copy link
Contributor

This issue has been mentioned on Home Assistant Community. There might be relevant details there:

https://community.home-assistant.io/t/state-color-not-working-for-entity-filter/169944/2

@iantrich
Copy link
Member

iantrich commented Feb 8, 2020

Please dont screenshot configurations, copy the text to here

@tdejneka
Copy link
Author

tdejneka commented Feb 8, 2020

... dont screenshot configurations, copy the text to here

Done.

@iantrich
Copy link
Member

iantrich commented Feb 8, 2020

Options for the card should be under a nested card option. Check the docs again

@tdejneka
Copy link
Author

tdejneka commented Feb 9, 2020

I reduced the code down to this but state_color still has no effect.

    cards:
      - type: entity-filter
        state_color: true
        entities:
          - binary_sensor.laundry_door_lock
          - lock.laundry_door_lock
        state_filter:
          - "on"
          - locked
          - unlocked

Where would your suggested "Options for the card ... nested card option" go in that example?


EDIT
I can get the desired effect by adding state_color to each entity, like this:

        entities:
          - entity: binary_sensor.laundry_door_lock
            state_color: true

However, that seems like a workaround for the issue that state_color cannot be defined to apply for all entities within a given entity-filter card.

@iantrich
Copy link
Member

iantrich commented Feb 9, 2020

It's in the docs

type: entity-filter
card:
  state_color: true

@iantrich iantrich closed this as completed Feb 9, 2020
@tdejneka
Copy link
Author

tdejneka commented Feb 9, 2020

Thank you for the example; that helped clarify how to use state_color properly.

BTW, recent posts in the community forum reveal others have also been stumped by how to use the new state_color option. One individual added it on per-entity basis and lamented having to make 150 additions.

Although you may believe the answer is "in the docs", the volume of puzzled users suggests it's not self-evident.

Thanks again for the example.

@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.
Labels
Bug Current Bug in UI - Extra Attention
Projects
None yet
Development

No branches or pull requests

3 participants