AalianKhan / mushroom-strategy

A strategy to automatically generate a dashboard using mushroom cards
MIT License
392 stars 38 forks source link

Unable to hide views #35

Closed Wickedy123 closed 1 year ago

Wickedy123 commented 1 year ago

Describe the bug Unable to hide Views.

To Reproduce The following YAML config hides the fan_count chip, but the light view is not hidden

strategy:
  type: custom:mushroom-strategy
  options:
    chips:
      fan_count: false
    views:
      light:
        hidden: true
views: []

Expected behavior Views can be hidden as per the documentation.

Screenshots N/A

Additional context I'm no expert on the YAML side so happy to be corrected on my bad syntax. However, I have copied the format given in the docs exactly.

DigiLive commented 1 year ago

@Wickedy123

Views can only be hidden since release 1.0.0-alpha.1

Please follow the instructions given on the release page.

Wickedy123 commented 1 year ago

@Wickedy123

Views can only be hidden since release 1.0.0-alpha.1

Please follow the instructions given on the release page.

Thanks for getting back to me @DigiLive . I did copy the example directly from the readme file but still had problems. Maybe the copy operation brought in some weird characters or something.

The following basic thing does now work for me however, for the benefit of anyone else reading this:

strategy:
  type: custom:mushroom-strategy
  options:
    views:
      lights: false
      fans: false
      covers: false
      cameras: false
views: []

However now I have an error browsing into an area where I have been busy hiding entities, or assigning them to other areas. Other areas still work OK. I know this is off-topic regards this bug report, but if you can shed any light on what specifically causes this error, I'd be most grateful!

Error loading the view strategy:

TypeError: Cannot read properties of undefined (reading 'attributes')

EDIT - I see this issue is reported in https://github.com/AalianKhan/mushroom-strategy/issues/25, I will add this to that thread.

DigiLive commented 1 year ago

That's the configuration format of the stable release. The readme you're consulting is probably of the latest pre release.

Pre releases can be enabled in HACS as mentioned in the release link I gave you before.

Wickedy123 commented 1 year ago

Thanks @DigiLive, I will close this issue. I will comment on the other issue as needed in its actual thread. FWIW I'm currently running 1.0.0-Alpha-2