https://github.com/robmarkcole/pan-tilt-hat-hass
Custom component adding the pimoroni pan-tilt-hat to Home-assistant: tested in HA 0.94 ok
https://github.com/robmarkcole/pan-tilt-hat-hass
home-assistant pan-tilt-phat pimoroni
Last synced: 9 months ago
JSON representation
Custom component adding the pimoroni pan-tilt-hat to Home-assistant: tested in HA 0.94 ok
- Host: GitHub
- URL: https://github.com/robmarkcole/pan-tilt-hat-hass
- Owner: robmarkcole
- Created: 2017-08-25T05:32:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-13T06:17:12.000Z (about 7 years ago)
- Last Synced: 2025-04-30T15:34:03.484Z (about 1 year ago)
- Topics: home-assistant, pan-tilt-phat, pimoroni
- Language: Python
- Homepage:
- Size: 3.47 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This custom component adds the [pimoroni](https://shop.pimoroni.com/products/pan-tilt-hat) pan-tilt-phat to [Home-assistant](https://home-assistant.io/).

Place the custom_components folder in your configuration directory (`pi@raspberrypi:~/.homeassistant $ mv ~/Github/pan-tilt-hat-HASS/custom_components .`) or add its contents to an existing custom_components folder. Add to your `configuration.yaml`:
```yaml
pan_tilt_phat:
```
The adds the services:
* `pan_tilt_phat.home` called with no data to return to home (0, 0)
* `pan_tilt_phat.pan` which can be called with e.g. `{"Pan":20}` to pan to 20 degrees
* `pan_tilt_phat.tilt` which can be called with e.g. `{"Tilt":30}` to tilt to 30 degrees
## Python scripts & automation
This repo also includes python scripts and automations to add slider control as shown in the image below. Moving the sliders triggers an automation which calls the python script to move the pan-tilt-hat. Copy the required content of the example config files to your own config files.