custom-cards / slider-button-card

A button card with integrated slider
MIT License
105 stars 16 forks source link

Please add support for venetian blind slat tilting #23

Open danielbrunt57 opened 1 year ago

danielbrunt57 commented 1 year ago

Is your feature request related to a problem? Please describe. I would like to see the correct visual representation for my venetian blinds tilt position.

Describe the solution you'd like This would require another option to the background: slider option (currently solid, gradient, triangle, striped, custom) whereby the visual would be extremely thin lines at 50% tilt and changing to increasing thicker lines as the percentage increases or decreases away from 50% becoming completely opaque at 0% and 100%. The thickness of the lines would come from the percentage of tilt with 50% being 1px and increase to whatever px is required to fill the window at 0 and 100. A formula like abs( 50 - state(cover.blind) ) would give you 0px to 50px. The action of the slider opening/closing would come from another HA entity responsible for raising/lowering the blind. So in essence the slider portion would come from 1 entity that raises/lowers the blind, which needs to be optional since in my case I do not have that feature automated, only tilt. The tilt entity would then only control the background image...thin lines becoming thicker and thicker as they tilt up/down

Describe alternatives you've considered Writing my own???

Additional context image image

rohankapoorcom commented 1 year ago

Sounds like a useful feature for people with Venetian Blinds. Do you want to write up a PR that covers your use case and then we can review?

danielbrunt57 commented 1 year ago

I've never written up a PR. How/where do I start?

danielbrunt57 commented 1 year ago

I've created Venetian Blind support #205 but what now?

rohankapoorcom commented 1 year ago

Ah I might have misunderstood your comment in the first message here.

Describe alternatives you've considered Writing my own???

With a PR, I was suggesting that you implement the code change that your a proposing for Venetian Blinds and then we can review the code and merge it.

danielbrunt57 commented 1 year ago

I kind of think the coding for this is beyond my abilities. I can read and mostly understand code and I can hack or copy/paste or make minor tweaks but writing my own code is really outside my depth of knowledge at present. I will do whatever I can though...

danielbrunt57 commented 1 year ago

I would need to understand how the current code works in detail but even then, implemented something different would be a huge challenge for me. This is not something I have tacked before...

danielbrunt57 commented 1 year ago

I do have a vision of what I am proposing but implementing it???

rohankapoorcom commented 1 year ago

No worries :) We can leave it open as a help-wanted issue and maybe someone else will contribute to it. Otherwise I will probably be able to take a look at it at some point, but I don't want to make a time commitment on when.

archont00 commented 12 months ago

A workaround is to use two cards in a horizontal group:

Screenshot_20230707_210136

P.S. This works for me out of the box, because my rollers switch Fibaro FGR-223 provides one entity for blinds and another one for slates. Proper implementation uses a single entity with attributes for blinds and slates positions.