maykar / compact-custom-header

This project has been replaced by Custom Header
MIT License
238 stars 31 forks source link

Multiple usernames don't work in a single exception if username has a space #243

Closed KBrownConsulting closed 4 years ago

KBrownConsulting commented 4 years ago

Summary: Specifying multiple usernames in a single exception doesn't seem to work if the usernames have a space in them. (The system doesn't apply the settings when the user logs in.)

But, it's probably important to note that it does accept usernames with spaces in them, if you only specify one username for the condition! So for example the following DOES work:

Example that DOES work: (Single user user with a space in their username)

cch:
  compact_header: false
  exceptions:
    - conditions:
        user: John Doe
      config:
        any_config_options_you_choose

Examples that DON'T work:

cch:
  compact_header: false
  exceptions:
    - conditions:
        user: 'John Doe, Jane Doe'
      config:
        any_config_options_you_choose

Another attempt removing the space after the comma:

cch:
  compact_header: false
  exceptions:
    - conditions:
        user: 'John Doe,Jane Doe'
      config:
        any_config_options_you_choose

Another attempt where I manually removed the quotes around the usernames. (The system automatically puts quotes around the usernames when I entered them from the CCH config GUI.)

cch:
  compact_header: false
  exceptions:
    - conditions:
        user: John Doe,Jane Doe
      config:
        any_config_options_you_choose

I actually tried a number of other formatting methods as well, such as manually adding double-quotes around the user names, but I think you get the idea & should be able to recreate the bug.

Test environment: Hass.io: 0.102.3 CCH: 1.4.9 Browser: Chrome 78.0.3904.108

maykar commented 4 years ago

Thanks, found the issue and fixed it in what will be CCHs replacement. To be released soon