The missing integration with Sunsa smart wands was a low-hanging fruit like what I’ve been sniping for a while in order to get my hands into putting together an integration. After realizing that no one had tackled such a fan project even with a REST API publicly available I wasted no time to get on it.
After installing this yesterday everything was working great. This morning, the blinds did not open automatically - I found that the authentication with UID and APIkey to Sunsa failed. Re-entering these keys via the config failed as being invalid.
So I then tried to login to Sunsa’s website via my email account - and it too failed. Requested a password reset email and 10 minutes later, it has not shown up.
Last night at 6:00 am UTC the integration asked me to reauthenticate. I simply reloaded it and it’s been fine since. Checking the logs, polling the cloud first timed out and then the API returned 401. Looks like a glitch on the Sunsa side.
Thanks for confirming there was indeed an issue on Sunsa’s end. I just now re-entered the UID/key and this time, it accepted it. So all good for now.
Meanwhile, I’m working with Sunsa support on why website auth is failing - but that’s really not relevant now to this issue.
EDIT: The credentials for the Sunsa mobile app are unique to it and have no relevance to the sunsawands website. So that explains why the website auth was failing. Next time there is a glitch like this, I need to verify if the Sunsa mobile app can connect or not. I haven’t actually used that app in well over a year and had forgotten about it too!
Hi, i wanted to ask a quick question, I was able to add the integration and it found the sunsa cover. I just wanted to know in regards to intended behavior, if the integration only allows for open and close in a single direction.
Example would be, currently the device goes from open to closed in the down position but there is not a way ive seen for it to be closed in the up direction.
It seems to be looking for set tilt functionality. The integration for this blinds uses the cover.set_position service instead of cover.set_tilt_position along with the position terminology instead of tilt terminology.
Could this be changed to more accurately reflect this type of blind usage with home assistant?
HA doesn’t support setting the absolute position of blinds (movement offset in any direction), only in one direction. The integration closes the blinds based on the Default Smart Home Direction setting in the Sunsa app. However, you can use the service sunsa.set_absolute_position to move them from -100 to 100.
Thanks for the suggestion. I tested with _tilt features and the main benefit is that the position of the blinds is represented with a nice visual gradient in the frontend.
But switching to _tilt would break existing installations until users manually change the service and attribute calls. Unless _tilt features are instead added with the current non-_tilt ones, which would allow to use either. The problem then is that it’ll be confusing to tell what’s the difference (there’s no functional difference) and, even worse, the More info screen will show both sliders:
Appreciate the info. Sorry for what may be a basic question, new to HA, have messed with editing things but haven’t had to learn this yet.
I saw the service.yaml in the Sunsa folder, so I add service sunsa.set_absolute_position to configuration.yaml as a new line? Or would I use this elsewhere. Thanks
No need to get in the config. To use the service you just call it from an automation action or a script action. To see how it works, use Developer Tools > Services:
I like the idea but it seems that general interest in the this is low. I have to research how to make the changes without breaking existing installations.
But by all means you can fork the repo and make your own version. You simply have to replace the inherited methods and supported features in cover.py by the their _tilt counterparts.
Thanks for building this. I’ve been using a cobbled series of command line curl integrations which has worked but is not nearly as elegant. This is great!
It’s about switching to using _tilt services (from the current cover.open_cover, etc, to cover.open_cover_tilt and others). Check my comment above.
You can find third party integration like this by searching for them in HACS or simply using a search engine (search by the company or product name in relation to Home Assistant).