Metadata-Version: 2.1
Name: pyelectroluxocp
Version: 0.0.17
Summary: Electrolux OneApp OCP API
Author: Woyken
Maintainer: Woyken
License: MIT License
        
        Copyright (c) 2023 Karolis Užkuraitis
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/Woyken/py-electrolux-ocp/
Project-URL: Documentation, https://github.com/Woyken/py-electrolux-ocp/blob/main/README.md
Project-URL: Repository, https://github.com/Woyken/py-electrolux-ocp.git
Project-URL: Bug Tracker, https://github.com/Woyken/py-electrolux-ocp/issues
Project-URL: Changelog, https://github.com/Woyken/py-electrolux-ocp/releases/
Keywords: home,automation,electrolux,aeg,ocp,oneapp,api
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Home Automation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: aiohttp-retry>=2.8.3

# py-electrolux-ocp

Python package wrapper around Electrolux OneApp (OCP) api

Early version, this package APIs might change

## Prerequisites

```
pip install aiohttp
pip install pyelectroluxocp
```

## Usage examples

Example to connect via websockets and listen for appliance state changes
```py
import asyncio
import json
from pyelectroluxocp import OneAppApi

async def main():
    async with OneAppApi("__username__", "__password__") as client:
        appliances = await client.get_appliances_list()

        print("appliances found: ", json.dumps([x.get("applianceData").get("applianceName")+" "+x.get("applianceId") for x in appliances]))

        def state_update_callback(a):
            print("appliance state updated", json.dumps((a)))
        await client.watch_for_appliance_state_updates([appliances[0].get("applianceId")], state_update_callback)

asyncio.run(main())
```

## TODOs

- Better error messages on known scenarios (login failed)

