Metadata-Version: 2.4
Name: reacthass
Version: 0.1.3
Summary: Lightweight Home Assistant API automation helper
Home-page: https://github.com/N4S4/reacthass
Author: Renato Visaggio
License: GPL-3.0 license
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: HomeAssistant-API<6,>=5.0.3
Requires-Dist: requests_cache<2,>=1.2
Requires-Dist: aiohttp-client-cache<1,>=0.11
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# ReactHass

ReactHass is a tiny Home Assistant helper around `homeassistant_api`.

## Install

`pip install reacthass`

## Usage
```python
from reacthass import Reactor

hass = Reactor('HOME ASSISTANT URL', 'YOUR TOKEN')

if hass.when_value_reached('sensor.temperature', 30, value_type='number'):
    hass.get_domain('fan').turn_on(entity_id='fan.fan')
```

## Notes
- Home Assistant states are strings, so numeric checks use `value_type='number'`.
- `get_entities_name('light')` returns full entity IDs like `light.kitchen`.
- The async API mirrors the sync API.

## Persistence
If you want to keep the sensor record in the database you might add to your configuration.yaml:

```yaml
recorder:
  include:
    entities:
      - sensor.test
```

## Examples
See the `/examples` folder.

## Credits
This package is built on top of [HomeAssistantAPI](https://github.com/GrandMoff100/HomeAssistantAPI)
