2 Stage heating with MQTT generic thermostat?

I am after a little advice on getting started with this one.

My plan is to convert a Fan Heater to by “smart” using Home Assistant and some MQTT controlled relays.
The heater has a single speed fan and low and high heat settings as well as a fan only setting.
My idea was to use an ESP8266 and some relay boards to switch between Fan, Low Heat and High Heat settings with the idea of using the Generic Thermostat to control it. The thing is, I haven’t found anyway for the Generic Thermostat to control what would essentially be two stage heating (high and low heat settings).

I am after some ideas on how this can be achieved.

This could be achieved using automations, e.g.:

  1. if room_temperature > target_temperature - 2 degrees switch to low heat.
  2. if room_temperature < target_temperature - 2 degrees switch to high heat.

And the generic thermostat will switch off the device completely if it reaches the target_temperature + high_tolerance.

Just to clarify: this is “pseudo code”.

@kirichkov:
Appreciate the input.
I might look into some kind of automation around that.
It might be a starting point. :slightly_smiling_face:

I think you need a preset_mode of ‘boost’. See https://github.com/home-assistant/home-assistant/blob/7ff7c7b9f5b7fcac5483cb975fe88bd747bbe4e8/homeassistant/components/climate/const.py. That seems to be the only way the climate component handle different heating levels.

MQTT does not seem to support this, see https://github.com/home-assistant/home-assistant/blob/7ff7c7b9f5b7fcac5483cb975fe88bd747bbe4e8/homeassistant/components/mqtt/climate.py. It could probably be fairly easily made to support a preset_boost though.

1 Like

@nickrout
That does look like maybe what I would want.
I thought of MQTT as it is pretty easy to implement using ESP8266 chips and Arduino codes.
Unfortunately I suspected what you have noted that MQTT may not support that in its current implementation.