44 lines
1.4 KiB
Markdown
Raw Normal View History

2021-01-08 08:06:27 +01:00
# Home Assistant - Albert Python Extension
An [Albert](https://albertlauncher.github.io/) extention to view and control devices in your [HomeAssistant](https://www.home-assistant.io/) instance.
This extension is heavily inspired by the home assistant extesnsion for ulauncher from [qcasey](https://github.com/qcasey/ulauncher-homeassistant).
![Demo](./ha_demo.gif)
## Requirements
To use this extension, you need the Python `requests` library:
2021-01-08 12:35:09 +01:00
```bash
2021-01-08 08:06:27 +01:00
pip install requests
```
## Configuration
You need to specify the URL and [API Key](https://developers.home-assistant.io/docs/api/rest/¦) of your Home Assistant instance in the configuration file (e.g. location: `$HOME/.config/albert/homeassistant_config.json`).
You can generate a new long lived API Key by clicking your name in the bottom left in the Home Assistant UI.
2021-01-08 12:35:09 +01:00
The item order is based on the entity class. Lights and switches are shown first, then scenes etc. You can change the order in the configuration file with `sort_order`. See the default sorting order below:
```json
{ ...
sort_order: {"light": 1, "switch": 1, "scene": 2, "group": 2, "automation": 3}
}
```
2021-01-08 08:06:27 +01:00
## Usage
2021-01-08 12:35:09 +01:00
```
<trigger> <entity search>
```
2021-01-08 08:06:27 +01:00
You can see the actions by pressing the `alt` key.
### ToDo
- renew icons (.svg)
2021-01-08 11:45:53 +01:00
- test more device classes and adjust which service to call
2021-01-08 08:06:27 +01:00
## Contributing
I welcome all issues and contributions! You can send patches per email to dev-at-hoellen.eu or open a PR/issue.