Temperature sensors via ESPHome -> MQTT —> Virtual thermostat: help?

Hi everybody,

I am trying to setup a multi zone heating system in my home, controlled via Homey.

I have the following idea. I want to setup a multizone heating system for my home. I am planning to this as follows:

Due to distance constraints I do not use zig bee/zwave temperature sensors. I have coupled several Xiaomi temperature/humidity sensors via BLE to an ESPHOME. This unit sends the data over MQTT to the Homey-MQTT broker. Via a flow I want to have these data put into a virtual thermostat. In case the temperature is too low, it will open a floor heating valve, steered by a Shelly one.

What I have now is the sensors are connected to the ESP home. The data is sent over MQTT and received by Homey broker. As example, one sensor sends the following topic:

xiaomitemperature/sensors/sensor/sensor_2_temperature/state
xiaomitemperature/sensors/sensor/sensor_2_humidity/state
xiaomitemperature/sensors/sensor/sensor_2_batterylevel/state.

These topics sends data as 20.4 or 50% or 80%.

My problem is how to get the temperature data into the virtual thermostat as sensor value.

I thought to start a flow with receiving a message, containing sensor_2_temperature, moving this value into the thermostat sensor…

But I can not get it to work. Anyone any idea how this flow should look like?

Thank you

Rene

Something like this: Gedeelde Flow | Homey

The first card uses “Received topic trigger” and subscribes to the full “temperature” topic, the second card sets the capability value of a virtual device using the “value” token (the value that was received on the MQTT topic).

Thanks Robert… dankjewel :slight_smile:

I was close, but this did the job.

Another question. I am planning to use some of the humidity and battery values also. I suppose I can store these in the virtual sensor and store the values under “measure_humidity” and “measure_battery”. Is that correct?

thank you!

Yes, that’s correct :smiley: