Skip to content
Custom component adding the pimoroni pan-tilt-hat to Home-assistant: tested in HA 0.94 ok
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
custom_components
docs
example_config_for_slider
python_scripts
tests
README.md
main_hass_pan_tilt.png
my_pan_tilt.png

README.md

This custom component adds the pimoroni pan-tilt-phat to Home-assistant.

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:

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.

You can’t perform that action at this time.