AalianKhan / mushroom-strategy

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

Add option to hide all entities of a device. #51

Closed AalianKhan closed 1 year ago

AalianKhan commented 1 year ago

48

ajagnanan commented 1 year ago

Would it be better to have it under a separate device_options instead of nested in card_options?

AalianKhan commented 1 year ago

@ajagnanan How I see it is that card_options is for editing the display of the cards. Entity IDs and now device IDs are just specifiers for which card to edit. I didn't want to create another entry for just hiding devices.

ajagnanan commented 1 year ago

Gotcha, I can test it when ready.

DigiLive commented 1 year ago

Would it be better to have it under a separate device_options instead of nested in card_options?

@ajagnanan How I see it is that card_options is for editing the display of the cards. Entity IDs and now device IDs are just specifiers for which card to edit. I didn't want to create another entry for just hiding devices.

The way I see it, cards are a visual representation of an entity. So actually I'm not to sure about listing a device_ids among entity_ids.

DigiLive commented 1 year ago

Gotcha, I can test it when ready.

@ajagnanan You can always test code.

  1. Make sure you create a backup of the original files to be able to revert.

  2. Place file src\mushroom-strategy.js from the correct branch (in this case hide-devices) in folder config/www/community/mushroom-strategy/ of your HA instance.

  3. Remove file mushroom-strategy.tar.gz from folder config/www/community/mushroom-strategy/ of your HA instance.

AalianKhan commented 1 year ago

@DigiLive Cards can display anything from areas to devices. It is a bit of a subjective statement

DigiLive commented 1 year ago

@DigiLive Cards can display anything from areas to devices. It is a bit of a subjective statement

No they can't, unless when it's a template-card of some sort. Otherwise cards display (or behave) on entity properties. But I see you've made your decision already by merging, so no need to discuss it anymore. 👍🏻 It's fine with me. Just giving feedback to show other perspectives.