Metadata-Version: 2.4
Name: aioafero
Version: 7.0.4
Summary: Talk to the Afero API asynchronously
Project-URL: Repository, https://github.com/Expl0dingBanana/aioafero
Project-URL: Documentation, https://aioafero.readthedocs.io/en/latest/
Project-URL: Changelog, https://github.com/Expl0dingBanana/aioafero/blob/main/CHANGELOG.rst
Author-email: Chris Dohmen <chris.dohmen11@gmail.com>
Maintainer: tpural
Maintainer-email: Chris Dohmen <chris.dohmen11@gmail.com>
License: The MIT License (MIT)
        
        Copyright (c) 2024 Chris Dohmen
        
        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.
License-File: AUTHORS.rst
License-File: LICENSE.txt
Keywords: Afero,Afero IoT,Hubspace
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Requires-Dist: aiohttp
Requires-Dist: beautifulsoup4
Requires-Dist: securelogging>=1.0.1
Provides-Extra: cli
Requires-Dist: click; extra == 'cli'
Provides-Extra: docs
Requires-Dist: furo; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Requires-Dist: sphinx>=9.1.0; extra == 'docs'
Provides-Extra: test
Requires-Dist: aioresponses; extra == 'test'
Requires-Dist: anyio[trio]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-aioresponses; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-mock; extra == 'test'
Requires-Dist: tox; extra == 'test'
Description-Content-Type: text/x-rst

========
aioafero
========

Async Python library for the Hubspace / Afero IoT cloud API. Discover devices,
poll state, and send commands through typed controllers on ``AferoBridgeV1``.

**Documentation:** https://aioafero.readthedocs.io/

.. image:: https://github.com/Expl0dingBanana/aioafero/actions/workflows/cicd.yaml/badge.svg?branch=main
   :target: https://github.com/Expl0dingBanana/aioafero/actions/workflows/cicd.yaml

.. image:: https://codecov.io/github/Expl0dingBanana/aioafero/graph/badge.svg?token=NP2RE4I4XK
   :target: https://codecov.io/github/Expl0dingBanana/aioafero

Installation
============

.. code-block:: bash

   pip install aioafero

For Home Assistant, use the `Hubspace integration <https://github.com/jdeath/Hubspace-Homeassistant>`_,
which installs this library from PyPI.

Quick start
===========

Examples assume an asyncio REPL (``python -m asyncio``).

.. code-block:: python

   from aioafero import v1

   bridge = v1.AferoBridgeV1("user@example.com", "password")
   await bridge.initialize()
   await bridge.async_block_until_done()

   light = bridge.lights.get_device("<device_id>")
   print(light.on)

   await bridge.lights.turn_on("<device_id>")
   await bridge.close()

See the `user guide <https://aioafero.readthedocs.io/en/latest/user/overview.html>`_ for
architecture, configuration, controllers, subscribe callbacks, and troubleshooting.

Contributing
============

Bug reports and pull requests are welcome on
`GitHub <https://github.com/Expl0dingBanana/aioafero/issues>`_.
See `CONTRIBUTING.md <https://github.com/Expl0dingBanana/aioafero/blob/main/CONTRIBUTING.md>`_
and the `contributing docs <https://aioafero.readthedocs.io/en/latest/contributing.html>`_.
