This is a collection of ESPHome custom components, configuration files, and custom code for my various ESP8266/ESP32 devices that integrate with Home Assistant. I am using includes and packages pretty extensively in order to prevent duplication and allow for easy changing of common settings.
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. For more information checkout ESPHome.io.
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. For more information check out Home-Assistant.io.
/- Yaml files for my devices and other core files/components- Custom components/images- Pictures of some of my devices/packages- Shared packages used by my devices/scripts- Couple of PowerShell scripts for managing the repo
You will notice that throughout the various folders I have secrets.yaml files. These files all do an include of the secrets.yaml file in the root folder (that for obvious reasons is not included in the repo).
I have been working on updating most of my custom code into components that can easily be pulled directly from GitHub into your device configuration using the external components component. I have run into frequent issues with changes in ESPHome breaking my components so I am now tagging my repo with the version of ESPHome it is compatible with. I generally upgrade pretty quickly so as soon as I have confirmed things are working and/or made the neccessary changes I will add a tag for the new version of ESPHome. While I primarily design these components for my own personal use cases I hope that at least some of them are useful for others. If you are using one of my components and have an enhancement/feature you would like to see feel free to add an issue and I will see what I can do to get it added.
This is component is curently running on a Shelly 2.5 Double Relay Switch and is used to control the main pump and the auxiliary pump (that runs a pool cleaner) on my pool. Eventually I want to expand this to run on an ESP32 and manage all aspects of my pool (pumps, lights, heat, fill, drain, pH, ORP, etc.). More details on how to use this component are available here.
This is a custom light component that works with TREO LED Pool Lights and exposes the different colors as "effects" so thay can be selected from Home Assistant. More details on how to use this component are available here.
This is a NodeMCU that I installed in my Cuisinart Coffee Maker. It has GPIO's connected to the indicator lights for the bold setting and power and has a couple of relays connected to the bold setting button and the power button. Aside from the ability to trigger automations based on the state of the coffee maker and automate turning on the coffee maker I also added a "bloom" feature. Coffee tastes better if you let the carbon dioxide escape (bloom) after getting the coffee grounds wet before continuing the brew cycle.
This is a WEMOS D1 Mini Pro that is connected to a couple of relays and a couple of water proof push buttons red and blue. The multi-click config on the fire pit switch is so that any press will turn it off but to turn it on you have to press it for 3 seconds (to try and prevent kids from turning it on). This is used to control the combination fire pit and fountain in my backyard. I just got this hooked up and is working good other then the fire pit doesn't always come on on the first try (I think I am getting some bounce in the switch but haven't had a chance to troubleshoot further).
This is a M5Stack ATOM HUB SwitchD mounted in a box on the side of my garage fridge with a PZEM-004T. It is paired with 2 Inkbird IBS-TH1 sensors for monitoring the temperature in the fridge and freezer sections. One of the relays on the M5Stack ATOM HUB SwitchD is used to control a pair of heaters that are inside the fridge to keep the fridge from dropping below freezing (frozen beer is no fun). I am not entirely happy with the parameters for the PID controller, I would like it to reach an equlibrium where the heater is on just enough to maintain the temperature at all times but instead it tends to ramp up and down quite a bit. The good news is even with the varying heat output it keeps the temperature pretty close to the desired temp. Using the autotune feature doesn't work because the bluetooth seems to cause periodic reboots which resets the autotune process. Maybe next winter I will try to create a temporary custom autotune that can survive restarts.

This is a NodeMCU that I have installed under my bed and is connected to a pair of Force Sensitive Resistors that are placed between the mattress and box spring of my bed, one for my side and one for my wife's side. Because the ESP8266 has only one analog input I had to add some transistors connected to pins D0 and D1 that are used to select which FSR is connected to the A0 analog input. The custom sensors in bed_sensor.h handles switching between the FSR's and reading the values from the FSR's. Generally when the bed is empty the reading is the full 1024 (or at least close to this). If someone is on one side of the bed or the other the reading is typically around 100. However if you lay in the middle of the bed I tend to get readings of around 600-700 on both sides. Thus the 3 different binary sensors (Chris is in Bed, Melissa is in Bed, Someone is in Bed). There is also a Master Bed Count that reports the total number of people in bed, I compare this to a sensor in Home Assistant that tracks the number of "masters" (my wife and me) that are home so that I can activate night mode when everyone is in bed.
This is a Waveshare ESP32-S3 7inch Touch LCD B that is controlling various functions for my pool via custom Pool Controller Component.
This device is sinificantly cheaper then a Sense Energy Monitor, can monitor 16 circuits in addition to the mains (Sense can only do 2 additional), and comes with all of the additional CT clamps. Like the Sense it is intended to work with a cloud service but because it is based on an ESP32 it can be flashed with ESPHome and made a local only device. More details can be found here.
I have a bunch of these smart plugs that I use for various things where I want to monitor the power consumption and/or be able to completely turn off the power (because they have a significant standby power draw). The TOPGREENER units are cheap, can be flashed with Tuya-Convert (or they could last time I bought one), and have power monitoring.
- Basement Fridge
- Basement TV
- Family Room TV
- Kitchen Fridge
- Network Equipment
- Sump Pump
- Washing Machine
My basement bathroom has a single gang box (and not enough room to swith to dual gang) for the switches to control the shower light and heat lamps so this is a perfect fit. The price is right, the buttons feel solid, and I was able to flash it using Tuya-Convert. It does seem to have corners that are squarer then typical so I had a little bit of trouble getting a standard cover to fit but nothing I couldn't fix with a file.
This is installed in place of the switch that controled my TREO LED Pool Lights. These lights have the option to select different colors by briefly turning them off and back on again and they do remember the last color when turned on again. The custom Treo Led Pool Lights component handles tracking the current color and exposes custom "effects" for each of the colors to Home Assistant. I have this configured to turn the lights on/off with the top/bottum buttons and use the middle button to change colors.
My garage lights are not dimmable so I decided to try out a Shelly device, I have this connected to a Leviton 5657-2W Momentary Center-Off Decora Rocker. Overall I am fairly happy with it I just wish the rocker switch wasn't so expensive or there was another similar option.