core: Shouldn't assume current position for PowerView shades
The problem
Sometimes my shades don’t always move to the correct location or can also be moved manually using a remote. With the PowerView shades, the current position isn’t reported to the hub in realtime to save on batteries. This causes the hub to not always know the shade’s current location. So the location reported to HA isn’t always correct.
In these scenarios, when trying to use cover.set_cover_position to set the shade to the position that HA thinks it’s already set to, nothing happens. For example, if HA thinks my shade is set to 60%, but it’s set to 20%, I have to tell HA to move it to 61% to get it to move.
What is version of Home Assistant Core has the issue?
core-2021.2.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
HunterDouglas PowerView
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hunterdouglas_powerview/
Example YAML snippet
# Put your YAML below this line
Anything in the logs that might be useful for us?
# Put your logs below this line
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (5 by maintainers)
Well it looks like the devices don’t actually report their battery state correctly. All of mine are wired and they don’t report a status of 4 per the api spec so forcing a refresh on powered devices more often is likely a no go.
I changed the code to always send the move command even when we think its in the right position. Its not ideal if you make a whole lot of adjustments in a short window, but given the design of the system outlined in that document, I think its the best we can do.
@bdraco This would be my first PR and first time working with Python, but I’m happy to give it a shot.