berrywhite96 / lovelace-shutter-row

Home Assistant Lovelace Shutter Row Card
MIT License
19 stars 4 forks source link

Invert slider #5

Closed dm82m closed 1 year ago

dm82m commented 1 year ago

Is it possible to add a property to invert the slider. If the state is open I would expect the slider to be on the left end of the scale. If it is closed I would expect the slider on the ride side of the scale. Currently it’s the other way around and confuses me.

berrywhite96 commented 1 year ago

invert_position does that literally for you.

dm82m commented 1 year ago

No, it just switches the open/closed states but the slider keeps the functionality as it was before.

berrywhite96 commented 1 year ago

No, it just switches the open/closed states but the slider keeps the functionality as it was before.

So you mean you want to e.g. set 20% and the cover position is set to 80%?

dm82m commented 1 year ago

34889DB9-F363-4AD7-BC58-72F41BD0DB4E

both are open. First one uses invert_position. But I do not want to invert the state of open/closed. I want to invert the slide. So in case of Open the slider should be left side. In case of closed it should be right side.

dm82m commented 1 year ago

No, it just switches the open/closed states but the slider keeps the functionality as it was before.

So you mean you want to e.g. set 20% and the cover position is set to 80%?

Maybe yes. But maybe this is also only some knots in my head. But asked my wife and she had the same desire 🥳

berrywhite96 commented 1 year ago

34889DB9-F363-4AD7-BC58-72F41BD0DB4E

both are open. First one uses invert_position. But I do not want to invert the state of open/closed. I want to invert the slide. So in case of Open the slider should be left side. In case of closed it should be right side.

Ahh okay the funny thing is all of my covers are set up this way. My covers have a attribute called invert_cover which I set to true. So I have exactly the behavior you want.

Atm I don't know what makes more sense:

dm82m commented 1 year ago

I would go with a attribute to invert the slider. Gives flexibility to the users. I am using homematic ip covers and have no invert mode there.

Ha dev docs says: „ The current position of cover where 0 means closed and 100 is fully open.“ So your plug-in is right but it’s just my brain that wants to have it other way round.

berrywhite96 commented 1 year ago

Ah okay I thought this a common option. So it will be option 3 then, something for my todo list.

berrywhite96 commented 1 year ago

Implemented with v0.2.0 release.