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

How to correctly format attribute if it contain spaces? #2

Open
TheStigh opened this issue Jun 11, 2019 · 2 comments
Open

How to correctly format attribute if it contain spaces? #2

TheStigh opened this issue Jun 11, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@TheStigh
Copy link

Hi, when using this card, if the attribute contain spaces, it does not show.
Example:
binary_sensor.530i_xdrive_condition_based_services.car = OK
binary_sensor.530i_xdrive_condition_based_services.['brake fluid status'] = Not OK

Attributes from dev-state:

car: 530i xDrive
brake fluid status: OK

    title: Attributes Card
    heading_name: List
    heading_state: States
    filter:
      include:
        - key: binary_sensor.530i_xdrive_condition_based_services.car
        - key: binary_sensor.530i_xdrive_condition_based_services.['brake fluid status']
@nibblerrick
Copy link

For me it worked just replacing the spaces with underscores (so would be binary_sensor.530i_xdrive_condition_based_services.brake_fluid_status in your case).
I don't know if that's the designated way it shoudl be handled but may be worth trying.

@rpitera
Copy link

rpitera commented Feb 1, 2020

I ran into this with the Tautulli sensor. It has some attributes listed as

  • Top TV Show
  • Top Movie
  • Top User

Setting the key to sensor.tautulli.top_tv_show didn't work. After a few other tries I ended up testing this for shits and giggles. Surely it wouldn't work...

filter:
  include:
     - key: sensor.tautulli.Top Movie
     - key: sensor.tautulli.Top TV Show
     - key: sensor.tautulli.Top User

And surprisingly this worked perfectly. I feel like this may be unique to certain entities, but you may want to try using the spaces and case as presented in the states view.

@iantrich iantrich added the help wanted Extra attention is needed label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants