diff --git a/base/hostconfig/wohnz.sls b/base/hostconfig/wohnz.sls index faeb68f..e71d626 100644 --- a/base/hostconfig/wohnz.sls +++ b/base/hostconfig/wohnz.sls @@ -1,3 +1,21 @@ hardware: raspberrypi: - has_fan: True + fan: + has_fan: True + controller: /usr/local/bin/fan_ctrl.py + service_name: fancontroller + +systemd: + service: + fancontroller: + Unit: + Description: Controlling the Fan via PWM + After: base.target + + Service: + ExecStart: /usr/local/bin/fan_ctrl.py + User: pi + Group: gpio + Environment: RPI_FANPIN=21 + Install: + WantedBy: multi-user.target