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

Appliance Capabilities via local JSON file - WELLBEING #113

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

coserotondo
Copy link

I tried a Wellbeing Appliances (Electrolux Purifier PUREA9) and I noticed that using the integration API, it reports no capabilities for the Purifier (while using the https://api.developer.electrolux.one/api/v1/appliances/{applianceId}/info I can get the Purifier capabilities).
Of course the washing machine and the dryer work as expected.
Despite not reporting the capabilities, the integration API reports the Purifier state via websocket.
So I added the capabilities to put a local JSON file under appliance_capabilities folder that can be manually extracted from the Electrolux Web API. It can be extended for any other model.
In addiction I modified the number entity to check the configured step: if it is 1, we can assume that the number is int so it will send the command as int instead of native float. This is because the Purifier accepts a fan speed between 1 to 9 and, sending a float (e.g. 3.0) generates and error as it expects 3. I think this is valid in general.

Supporting JSON files with the capabilities of the appliance that don't return capabilities with the /{appliance_id}/capabilities but work with /api/v1/appliances/{applianceId}/info (https://developer.electrolux.one/documentation/reference#getUserAppliances). The working URL can be used to build the offline file.
JSON file capabilities for Electrolux Pure A9 Purifier.
Add local JSON file capabilities to be loaded
@danielskowronski
Copy link

manifest.json must be updated to have aiofiles in requirements - otherwise it won't install.

Added aiofiles requirement.
@coserotondo
Copy link
Author

manifest.json must be updated to have aiofiles in requirements - otherwise it won't install.

Updated, thank you.

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.

2 participants