Skip to content
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

Slider support for cover #184

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

shotreal
Copy link

@shotreal shotreal commented Aug 8, 2023

Simply making you aware of the extension i made, may be it can be of use. If not ignore my pr.
Nice and clear code btw :)

I needed a slider support. (as some others also requested i think)
I included a command topic "set_position_topic" as documented here https://www.home-assistant.io/integrations/cover.mqtt/
the topic is only "activated" for HACover::PositionFeature
I introduced a new callback to get the slider values back.
Borrowed from your HANumber implementation. You might want to check that part.

I have not checked if this value also needs to/ can be feed back to HA, yet (Like you do with the number slider, because i think cover gets that information from the "position_topic") I'm just happy that it works!
I have not written any test cases to verify my code, yet. May be i do.

@erdeidominik99
Copy link

Hello!
@shotreal Thank you for the code, it works great, can you help me, how to add the position_open and position_closed parameters? By default the open is 100% and the closed is 0%, but I need the opposite (open 0% close 100%).

@dawidchyrzynski dawidchyrzynski changed the base branch from main to develop February 6, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants