-
Notifications
You must be signed in to change notification settings - Fork 19
Add model type 72 (Silhouette) #41
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
base: master
Are you sure you want to change the base?
Conversation
It sure this is the fix to the issue. From the issue #40 you raised this will now break Tilt as well I've been on some personal/family time for a while but should find time to come back to look at the outstanding issues on this. Got a feeling this one may be related to another fix I started and didn't finish yet. |
Yep, it is. I forked your repository and did this change. Then I copied the HASS integration as a custom component so I can use my fork with my fix in it through HASS. All in all, it is now working as expected with the commit I provided. :-) |
Can you provide the json for the shades - what capabilities were they originally reporting ? There could be an issue in that class I need to look into |
Sure, here you go:
They are reporting capability 2 which resulted in them getting the bottomUp I believe but with tilt anywhere resulting in the call always including the tilt parameter. |
TiltOnClosed has historically indicated that the tilt should only work when the blinds are closed. Not that the tilt needs to be closed to open them From what you posted it sounded like perhaps the issue was only with the open/close buttons, and the positional changes work as expected. Can you confirm if (using the old code) and changing the positional changes using the UI (as opposed to the open close buttons) results in the same outcome? I recall one of the things I needed to fix was the close position on one of the classes - which I suspect may be the cause here There is a lot of crossover between the classes so it's entirely possible that what you have done works, it doesn't rule out an issue in the code for their true type though |
With the old, pushing the open button would not work. Pushing the close button did work. Changing the position to any % except for 0% would not work either. 0 < Position => 100 (tilt is then always 0) -> set position to anything else non-zero => position goes to 0% (blind closes) From the API, when we're setting tilt we only need to provide the tilt parameter in the call, not the position as the blind will automatically close if not closed and then set tilt. |
FYI, I've been using this change with my blind now for few weeks without issues. Open, close, tilt all works. |
Based on this comment - could you please try the below as a fix for all type 2 shades instead of hardcoding them. https://github.com/kingy444/aio-powerview-api/blob/shade72/aiopvapi/resources/shade.py |
That is not going to work. If I /home/shades/positions?ids= Then the shade opens completely instead of going to 70% even although tilt is always will be 0 unless position is 0 in which case tilt can be something different. If I provide this: If I then provide this: Now if I provide this (no tilt provided): If I then provide: And with this: Starting again from this: Providing position and tilt works as long as we provide the position of 0, but I think this is more because the blind prefers setting blind based on tilt and only if not provided then uses the position (refer back to my 1st example): If I do this: Providing a tilt of 0 and a position of non-zero just results in the blind completely opening ending with position=0 and tilt=0. In the end, if we want to change the position then we can't provide the tilt. And if we want to change the tilt then it is best not to provide the position although normally it looks like tilt always gets preference. Hope this explains the behavior and when I looked it really is behaving the same as the other silhouette with model type 23. |
Just checking on this to see if my examples and what I see explains behavior. |
Added model type 72 (Silhouette) to ShadeBottomUpTiltOnClosed90 as capability reported by this blind is incorrect.
Fixes issue #40