I’m pretty new to HA ecosystem and I want to create a heating automation for my home. Here is the basic setup I have:
-My home is heated by single boiler and several radiators.
I have HA installed on a RPi3 B+, and ESP32S and 4 xiaomi mijia thermometer and humiditiy sensors which I have flashed with costom firmware.
I already integrated the temp sensors into the HA with ESP32 and I have no problem getting the temp values from each sensors. What I intend to do is place each sensor in different rooms (Bedroom, office, living room, and guest bedroom) and turn on the boiler by getting the data from only one sensor (which I select from the lovelace or somewhat). For example, when I sit in the living room I want automation to turn on boiler by the data that is acqiured from only the living room. rest of sensor values sould be ignored by the system. Basicially I need something like 4 buttons in a card. When I press button 1 in lovelace, boiler will controlled by sensor1. If I press button 2, button 1 should be like unpressed and boiler sould be controlled only by the sensor 2 values. By the way, I need a set temperature feature as well.
Well, I need some help from you guys.
Thanks in advance.
Make the target temperature sensor a template sensor that will take the value of the thermometer based on an input select.
If you’d like to use buttons instead of input_select, you’ll have to have automation on pushes of the thermometer buttons. Each thermometer should have an input_boolean meaning button pressed/selected. Once you push one of the thermometer buttons an automation should turn off the other three thermometer input_booleans and set the template sensor value. And this done for all three thermometers.
Thanks for your help. I got the general idea. However, I was not able to create a template sensor since my code writing ablity is like ‘super-beginner’. A piece of example code would be great
Thanks!
For the button solution, let’s say you have input_boolean’s for room1-4 and temperature sensors for those room1-4. The template for the generic thermostat target temperature would be: