I’m trying to use ESPHome for the automation of a fan. At the moment I’m using a custom made program on a ESP8266 to do this, but I want to replace this program with ESPHome.
The problem is that I don’t know how to do this using ESPHome so any help would be appreciated.
I control the fan using Home Assistant. In Home Assistant I have an input_select (low/medium/high) with an automation that sends MQTT messages to a specific topic. The ESP module subscribes to the topic and sets some GPIO pins.
The problem is that I have to update multiple GPIO pins (multiple relays):
GPIO4 Low, GPIO5 Low -> Fan at low speed GPIO4 High, GPIO5 Low -> Fan at medium speed GPIO4 Low, GPIO5 High -> Fan at high speed
The fan cannot be turned off (default is low speed). I want to replace the MQTT part by the HA <-> EPSHome API.
I’m not sure how to do this in an ESPHome configuration. I know that I can define two switches in ESPHome and control them using HA but it would be great to have one single HA entity connected to EPSHome.
The reason for this is that the GPIOs may not be HIGH at the same time! So I would like to restrict this inside the ESPHome program.
Can anybody give me an ESPHome config example of how to connect my HA input_select to the ESPHome module?