-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to use type "area" for area cards instead of Mushroom template card #52
Conversation
@AalianKhan @ajagnanan @DigiLive would love to hear your input on this 😄 |
I think it's a good addition! Is there a way to move the section header Edit: I see it's fixed with #50 |
@johanfrick Thank you for your effort in enhancing the strategy. I do like the looks, but I have some objections also...
areas:
biljardrum:
type: area
area: biljardrum
navigation_path: biljardrum My advice to @AalianKhan is to enable the discussions in the settings of this repository and talk about this request and/or poll the user's opinions in a dedicated topic. |
Yeah, you make a fair point that this is a strategy for Mushroom cards. However, this is also the greatest strategy I've seen for Home Assistant and I think the crowd can be made a lot wider if we allow some more customisation. Many people prefer Mushroom cards and nothing else, but not everyone does. |
Locked to continue the discussion at #58 |
I've unlocked this PR so the commits can be discussed. |
3d32b79
to
5874e9e
Compare
Please review again @DigiLive . I have updated the code according to your comments. I have also updated the README, and the PR description. |
@DigiLive Ready for another review. I have updated according to your comments. |
Please don't push any other commits as I'm reviewing and tweaking locally now. I really want to avoid merge conflicts at this point. |
@johanfrick Can you evaluate my code changes, please? |
An error would be shown in the console (in debug mode) if there's no type set for any of the cards. This is fixed by giving the type a default value.
@DigiLive I have evaluated the code. It looks reasonable to me. I have also verified it by trying it out locally. I am happy to go forward with this solution. 👍 |
Anything else needed before merging? |
This looks well if the rooms have no temp/humidity sensors. If there are sensors for an area, they show up in the area card and therefore the UI looks too narrow and bad. The easiest solution would be to make them appear in one column. |
What
This provides an option to use
type: area
instead of mushroom-template-card for Areas, by configuringuse_ha_area_card: true
.Along with that an option is also added to set common options for all area cards. Example:
Of course it was already possible to override type in mushroom-strategy, but that wouldn't work with the
type: area
, since it also requiresarea: <area id>
.Why
Example
Example of how it can look: