semvec/pypi-packages huggingface dataset:
local-tuya-ceiling-fan 1.5.0
Control a Tuya Ceiling fan over LAN.
License: MIT
Requires Python: >=3.8

# local-tuya-ceiling-fan

[![tests](https://github.com/gpajot/local-tuya-ceiling-fan/workflows/Test/badge.svg?branch=main&event=push)](https://github.com/gpajot/local-tuya-ceiling-fan/actions?query=workflow%3ATest+branch%3Amain+event%3Apush)
[![version](https://img.shields.io/pypi/v/local-tuya-ceiling-fan?label=stable)](https://pypi.org/project/local-tuya-ceiling-fan/)
[![python](https://img.shields.io/pypi/pyversions/local-tuya-ceiling-fan)](https://pypi.org/project/local-tuya-ceiling-fan/)

Control a Tuya Ceiling fan over LAN.

## Features
- asynchronous methods and transport
- persistent communication to the device
- automatic remote device state updates (remotes can still be used)
- configurable buffering for subsequent updates
- constraints between device commands
- Domoticz plugin using a dedicated thread

## Usage
See [local tuya requirements](https://github.com/gpajot/local-tuya#requirements) first to find device information.

Example usage:
```python
from local_tuya import DeviceConfig, ProtocolConfig
from local_tuya_ceiling_fan import FanDevice, FanSpeed


async with FanDevice(DeviceConfig(ProtocolConfig("{id}", "{address}", b"{key}"))) as device:
    await device.switch(True)
    await device.set_speed(FanSpeed.L2)
    await device.switch(False)
```

> 💡 There is a safety mechanism that turns off the fan and waits 30s before changing the direction.

## Domoticz plugin
The plugin requires having fetched device information using instructions above.
Make sure to read [plugin instructions](https://www.domoticz.com/wiki/Using_Python_plugins) first.
> 💡 The Domoticz version should be `2022.1` or higher.

```shell
python -m pip install --upgrade local-tuya-ceiling-fan[domoticz]
python -m local_tuya_ceiling_fan.domoticz.install
```
Domoticz path defaults to `~/domoticz` but you can pass a `-p` option to the second command to change that:
```shell
python -m local_tuya_ceiling_fan.domoticz.install -p /some/other/path
```

Restart Domoticz and create a new Hardware using `Tuya Ceiling Fan`. Fill in device information and add.
The hardware will create up to 5 devices to control the fan (all prefixed with hardware name):
- `power`: turn the fan on or off
- `speed`: set the speed
- `direction`: set direction
- `light`: turn the light on or off
- `mode`: set the operating mode

You can customize the devices you want added in the hardware page.

All device names and levels can be changed once added as only IDs are used internally.
pyfoldingathomecontrol 3.0.1
Python library to get stats from your Folding@Home Clients
License: MIT
Requires Python: >=3.8,<4.0
Keywords: Folding@Home,asyncio

# PyFoldingAtHomeControl

Python library to get stats from your Folding@Home Clients

[![GitHub Actions](https://github.com/eifinger/PyFoldingAtHomeControl/workflows/Python%20package/badge.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/actions?workflow=Python+package)
[![PyPi](https://img.shields.io/pypi/v/PyFoldingAtHomeControl.svg)](https://pypi.python.org/pypi/PyFoldingAtHomeControl)
[![PyPi](https://img.shields.io/pypi/l/PyFoldingAtHomeControl.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl)
[![Downloads](https://pepy.tech/badge/pyfoldingathomecontrol)](https://pepy.tech/project/pyfoldingathomecontrol)

## Installation

```bash
pip install PyFoldingAtHomeControl
```

## Usage

```python
import asyncio
from FoldingAtHomeControl import FoldingAtHomeController
from FoldingAtHomeControl import PyOnMessageTypes


def callback(message_type, data):
    print(f"callback for: {message_type}: ", data)


async def cancel_task(task_to_cancel):
    task_to_cancel.cancel()
    await task_to_cancel


if __name__ == "__main__":
    Controller = FoldingAtHomeController("localhost")
    Controller.register_callback(callback)
    loop = asyncio.get_event_loop()
    task = loop.create_task(Controller.start())
    try:
        loop.run_until_complete(task)
    except KeyboardInterrupt:
        pass
    finally:
        print("Cancelling task")
        try:
            loop.run_until_complete(cancel_task(task))
        except asyncio.CancelledError:
            print("Closing Loop")
            loop.close()
```
atpthings 0.0.44
ATP-things python package
License: MIT
Requires Python: >=3.8
Keywords: atpthings,iot

![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
![Github release](https://img.shields.io/github/release/atp-things/pkg-python-util.svg?label=tag&colorB=11ccbb)
![](https://anaconda.org/andrazpolak/atpthings/badges/version.svg)
[![PyPI](https://badge.fury.io/py/atpthings.svg)](https://badge.fury.io/py/atpthings)


# ATP-things

Homepage: https://atp-things.github.io/
Repository: https://github.com/atp-things/pkg-python-util

## PYPI

URL: https://pypi.org/project/atpthings/

### Install

```bash
pip install atpthings
```

## Conda

URL: https://anaconda.org/andrazpolak/atpthings

### Install

```bash
conda install -c andrazpolak atpthings
```

## Import

```python
import atpthings
```