Hi all
I have an electric heater controlled by a Sonoff Mini R2 (not yet flashed). I am planning to flash it with Esphome, but I want 2 things:
- I have a solar system, and I want to use excess solar power to use the heater. But using it normally (just turning ON the relay) will drain my batteries. So I was hoping that it could expose an “dimmer” or similar interface that would internally cycle it ON/OFF, e.g. in 10% steps (0% is OFF, 10% is 30s on and 4min30s off, etc, with 100% being always on). This is a bit like these old heaters with knobs that allow for a granular control. The reason for the long cycles is that if I understand correctly, cycling a relay at short intervals will burn it. Then, HA will determine (using some temperature sensors) if the heater should be on, and modulate the % based on available solar electricity.
- A button is connected between S1 and S2. Turning it to ON shouldn’t do anything if HA has already turned the heater on, but turning it OFF should always switch it off (for emergencies).
So far, I can figure out the HA side easily enough, but how can configure my Sonoff Mini R2 to expose this kind of interface using Esphome? Thanks