I’m trying to build powered vents to vent my upper floor rooms into my attic. It would be the equivalent of a “whole house fan” but individual per room. The vents also feature a motorized cover (controlled by a servo) to prevent leaking air in the winter or when otherwise not desired.
I’m looking for advice as to how to automate opening the cover when the fan is active and vise versa. The only way I can possibly see doing this within the ESPHome framework is by creating a custom MQTT topic, which could then trigger both the cover and fan at the same time, but I cannot find any clear examples of how that would be done.
Any advice on what direction to take would be welcome.
When you turn the fan on or off, it generates a state change event in home assistant. An event can trigger an automation. The automation can open or close the vent. See https://www.home-assistant.io/docs/automation/trigger/
You may create a template sensor which track the state of the fan (something like if speed >0) and use it to open/close the vents. You can also use esphome and do this inside the esp. I did something similar with esphome to automate a heater with 3 relays, one to fan, one to low and other to high. Fan has to be on if low is on, low and fan has to be on with high is also on. Here is the code to control the “high” switch: