AalianKhan / mushroom-strategy

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

strategyOptions.areas is not iterable #27

Closed dberrocal-git closed 1 year ago

dberrocal-git commented 1 year ago

Describe the bug Error loading the dashboard strategy:

TypeError: strategyOptions.areas is not iterable

strategy:
  type: custom:mushroom-strategy
  options:
    areas:
      salon_id:
        name: Room
        icon: mdi:television
        icon_color: green
views: []

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Edit configuration'
  2. Add an 'area'
  3. See error
DigiLive commented 1 year ago

The readme which is currently visible is of the latest commit to the main branch which isn't compatible with the current release.

Please consult the readme of the previous commit. E.g. https://github.com/AalianKhan/mushroom-strategy/tree/de70fddddd3da8bf7b3d3b34930285f54e54da28

@AalianKhan Any sight on the next release date?

DigiLive commented 1 year ago

I've created a pre-release which you could try. @dabm-git Any feedback would be appreciated.

Otherwise this issue will be closed for being fixed or stale.

dberrocal-git commented 1 year ago

Updated to 1.0.0-alpha.1 and so far so good. I even put custom cards per room without problem and icons.

Thanks for making this, it saves a lot of time!

pavolholes commented 1 year ago

Hi all, I'm using the Mushroom-strategy very happily for some time already and I think it's time to customize it a little, so I've starded with adding the icon to the areas and I've had this issue, so I've updated via HACS to pre-release and I've udpated my code to:

strategy:
  type: custom:mushroom-strategy
  options:
    areas:
      - name: Obyvacka
        icon: mdi:sofa
        icon_color: red
      - name: Radkova
        icon: mdi:teddy-bear
views: []

The "Obyvacka" area has name "Obyvacka" and ID "bd3433244dc9f41bc6c2d734b0364567", do I understand correctly the ID is not needed anymore? It doesn't apply the icon nor the color, I still get only the same automatic list of all areas (24). The "Radkova" area has name "Radkova" and ID "radkova". Also the icon is not updated.

I've done Ctrl+F5, I've done full reboot of Home Assistant. I'm not getting any warnings when saving the customization.

Am I doing something wrong, please? Thanks a lot!

DigiLive commented 1 year ago

Please consult the readme file of the pre release. Your configuration has the "old" format/syntax.

pavolholes commented 1 year ago

Aaaaah, so above is old syntax... So it's vice-versa to what I thought. Now it's working, thanks a lot! I'm sorry for wasting your time. Only for a reference, this is the new working config:

strategy:
  type: custom:mushroom-strategy
  options:
    areas:
      bd3433244dc9f41bc6c2d734b0364567:
        name: Obyvacka
        icon: mdi:sofa
        icon_color: red
      radkova:
        name: Radkova
        icon: mdi:teddy-bear
views: []