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

Add Configuration options for open/close orientation #154

Merged
merged 5 commits into from Jul 6, 2022
Merged

Add Configuration options for open/close orientation #154

merged 5 commits into from Jul 6, 2022

Conversation

pawlizio
Copy link
Collaborator

This solves #123

I've prepared and tested a configuration posibility via HA. For open_orientation and close_orientation I've created NumberEntities which can be adjusted by a slider in HA between a range of 0 and 100. So you can define your desired open and close orientation which will be used if you press the arrow buttons. You can try this also using my custom compent, but you have to use the branch "add_orientation_config": https://github.com/pawlizio/my_velux/tree/add_orientation_config

It looks as follows:
image

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2022

Codecov Report

Merging #154 (d63c92c) into master (c742a1b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   81.67%   81.68%   +0.01%     
==========================================
  Files          77       77              
  Lines        3269     3271       +2     
==========================================
+ Hits         2670     2672       +2     
  Misses        599      599              
Impacted Files Coverage Δ
pyvlx/opening_device.py 51.16% <100.00%> (+1.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c742a1b...d63c92c. Read the comment docs.

@Julius2342
Copy link
Owner

Hi @pawlizio . Thank you for your PR! May you explain this logic? I looked at it but did not undestand it ... :)

@pawlizio
Copy link
Collaborator Author

I just created two variables, which I can access and modify via HA, so I'll able to change the default values:

        self.open_orientation_target: float = 50
        self.close_orientation_target: float = 100

The main change is done on my velux custom_component, but it can also implemented into the HA velux integration.

@pawlizio
Copy link
Collaborator Author

Hey @Julius2342 : Any doubts to merge this PR? `Do you need further explanation of the background?

Finally this enables users to adjust their desired orientation value which is used when calling "open_orientation" or "close_orientation" command within HA. This makes it possible for different blinds to define different open or close values.

For example some blinds are opened at 50% while others are opened at 100%. By setting self.open_orientation_target via HA you can enter that value which you want or which is best for your device. May you want to move the orientation to 30% if you press the open arrow button within HA. With this modification you have variables which you can use to define this.

@pawlizio
Copy link
Collaborator Author

pawlizio commented Jul 2, 2022

Can you merge this PR?

@Julius2342 Julius2342 merged commit 6f58aa2 into Julius2342:master Jul 6, 2022
@Julius2342
Copy link
Owner

Merged. Sorry for the delay!

@pawlizio pawlizio deleted the add_options branch December 21, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants