This is my last ditch effort to cool down my attic PoE switch that runs my cameras.. of course I had to hook it all up to Home Assistant to monitor the temps and control the PWM fans! The code for the ESP32: text_sensor: # Send IP Address - platform: wifi_info ip_address: name: Fanhub IP Address # Send Uptime in raw seconds - platform: template name: Fanhub Uptime id: uptime_human icon: mdi:clock-start sensor: - platform: wifi_signal name: Fanhub WiFi Strength update_interval: 30s - platform: dht pin: GPIO15 temperature: name: "Temperature" humidity: name: "Humidity" update_interval: 10s - platform: pulse_counter pin: GPIO13 name: Fanhub Fan Speed1 id: fan_pulse1 unit_of_measurement: 'RPM' filters: - multiply: 0.5 count_mode: rising_edge: INCREMENT falling_edge: DISABLE update_interval: 3s - platform: uptime name: Fanhub Uptime id: uptime_sensor update_interval: 60s on_raw_value: then: - text_sensor.template.publish: id: uptime_human # Custom C++ code to generate the result state: !lambda |- int seconds = round(id(uptime_sensor).raw_state); int days = seconds / (24 * 3600); seconds = seconds % (24 * 3600); int hours = seconds / 3600; seconds = seconds % 3600; int minutes = seconds / 60; seconds = seconds % 60; return ( (days ? to_string(days) + "d " : "") + (hours ? to_string(hours) + "h " : "") + (minutes ? to_string(minutes) + "m " : "") + (to_string(seconds) + "s") ).c_str(); output: - platform: ledc pin: GPIO27 frequency: 10000 Hz id: fanhub_pwm1 fan: - platform: speed output: fanhub_pwm1 name: "Fanhub Fan1" 🔥These links support my madness🔥 💲 NordVPN: http://www.bmbsucks.com 💲 Members-Only Punishment: https://bit.ly/bmbmembers 💯These are my other Socials💯 🔹Twitter: https://bit.ly/BMBTw 🔹Instagram: https://bit.ly/bmbinstagram 🔹Tik-Tok: https://bit.ly/bmbtock 🔹Discord: http://bit.ly/BMBDISCORD ✉️P.O. Box for Mail✉️ Byte My Bits P.O. Box 77 Haysville, KS 67060

My first Robo-Mower... and it's the GOAT A2500 RTK!
3.9K views

ITS ALIVE! No fires were started during the making of this video.
5.7K views

How not to install an EP Cube home battery backup
6.1K views

RGB Eyes that follow movement with a mmWave sensor and Home Assistant
3.0K views

The BEST and most useful mod I've ever made for Home Assistant
6.0K views

So many fails, so many new things. (Sensors, Home Assistant, Prototyping, etc.)
9.5K views