Created
July 22, 2021 09:25
-
-
Save Bouni/53d89a21a6e10618968c88599554fec3 to your computer and use it in GitHub Desktop.
ESP Home fan controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
devicename: "fancontroller-1" | |
upper_devicename: "Fan controller 1" | |
# GPIO config | |
fan_1_power_pin: GPIO16 | |
fan_1_pwm_pin: GPIO17 | |
fan_2_power_pin: GPIO21 | |
fan_2_pwm_pin: GPIO22 | |
status_led_pin: GPIO2 | |
output: | |
- platform: ledc | |
pin: ${fan_1_pwm_pin} | |
id: fan_1_speed | |
frequency: "2441Hz" | |
- platform: gpio | |
id: fan_1_power | |
pin: ${fan_1_power_pin} | |
- platform: ledc | |
pin: ${fan_2_pwm_pin} | |
id: fan_2_speed | |
frequency: "2441Hz" | |
- platform: gpio | |
id: fan_2_power | |
pin: ${fan_2_power_pin} | |
fan: | |
- platform: speed | |
name: "Fan 1" | |
output: fan_1_speed | |
on_turn_on: | |
- output.turn_on: fan_1_power | |
on_turn_off: | |
- output.turn_off: fan_1_power | |
- platform: speed | |
name: "Fan 2" | |
output: fan_2_speed | |
on_turn_on: | |
- output.turn_on: fan_2_power | |
on_turn_off: | |
- output.turn_off: fan_2_power |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment