maykar / compact-custom-header

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

Conditional Styling not persisting with two booleans when tab is refreshed #194

Closed ecelonghorn closed 5 years ago

ecelonghorn commented 5 years ago

Describe the issue:

When using more than one conditional to edit a tab (hide or change color) based on a boolean, the conditions do not always persist when the browser is closed.

If both booleans are on, it works. If both are off, it works.

However, if one is on and one is off then the settings that were changed mess up the other tab settings. For example, on tab is hidden (boolean off) and one tab is showing (boolean on), if you refresh the page, then both tabs are hidden (see below image)

Config YAML:

cch:
  background: black
  chevrons: true
  tab_indicator_color: transparent
  conditional_styles:
    - entity: input_boolean.show_shopping_list
      condition:
        state: 'off'
      tab:
        '7':
          hide: true
    - entity: input_boolean.show_floorplan
      condition:
        state: 'off'
      tab:
        '8':
          hide: true

HA and/or Browser Error:

No errors in log or browser. Able to use other features of CCH like changing header color, and have even used exceptions for users (removed those for now to debug).

Versions and Browser:

Hassio version: 0.98.1 (waited to update to 0.98.3 since debugging) Hassio version 0.98.3 (updated and issue is still present) CCH: 1.3.6 Browser: Chrome YAML mode

Image 1 shows default state of booleans on and tabs showing. Image 2 shows floorplan off and tab hidden Image 3 shows after the page was closed and re-opened. No other changes. Both tabs hidden

Capture

maykar commented 5 years ago

Should be solved in the latest release. More info:

https://community.home-assistant.io/t/compact-custom-header/83716/1179

ecelonghorn commented 5 years ago

I have tested it on 1.3.8 and Hassio 0.99.2 and it looks to be completely fixed! Thanks for the help and the amazing plug-in