-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
feat(light): add collapsible controls for light #383
Conversation
I understand why you want to do this, but it definitely needs to be an option (I see it already is) Having the slider visible whilst the light is off, means you can tap the slider at any position which turns it on at that brightness. Without that, you can only turn it on/off |
@piitaya thanks for the feedback, I only tested it without the grid: Moreover, I only partially understand your problem. If I have two lights, one with and one without a slider, the card will also take the full height. So the problem exists independently of my implementation: In addition, when both lights are off, the size is reduced. So the goal of saving space is fulfilled: A solution to your problem would be to put every light in a vertical-stack card:
@greghesp I implemented it as an option: |
@piitaya By removing |
@piitaya please check again; I implemented a version which works like this: Does this align with your standards? |
@piitaya did you have some time to look at my implementation? Thank you in advance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi 🙂 Sorry, the PR was in draft, I thought it was not ready to review 😅
Maybe a collapse_controls
instead of enable_collapse
can be more explicit ? What do you think?
I will investigate how we can change the layout to support filling parent height or not. I will give some tests 😅 It will be another PR.
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Hey, many thanks for the feedback! Also, the PR is now ready for review. |
What about renaming |
I am open for anything which fits better in your opinion. |
A small note: The question came up in the forum why it doesn't work. |
I think this is a HACs thing. Not overly familiar with how HACs reads things, but I believe an Info.md is needed for HACs if you want the Readme to belong only to the repo |
Description
implementation of the "Collapse slider when off" function from Ui Lovelace Minimalist.
Related Issue
#126
Motivation and Context
I really liked the function & implemented a workaround with the state-switch card, but thought it would be great to have this function natively.
How Has This Been Tested
I tested it with the Development server as mentioned in the README
Types of changes
Checklist
I could need some help with translations, testing & documentation.
Also, I tried to align with the code style of this project, but I am open for critics.