A simple python script to control a fan from Home Assistant.
Note: I have replaced this Raspberry based solution with an Wemos/ESPHome based one you can find here:
https://gist.github.com/SqyD/38d10391c2e21988406d2bdaec24f031
- Installing dependencies on a stock Raspbian install:
sudo apt-get update