Thermostat with PID controller

Maybe with Home Assistant statistics using the heater switch. But I have no clue about how to do it.

You could use the History Stats sensor for periods that fit within the purge history time of the recorder, but not for months and years.

If you create a sensor that cumulatively counts how long something was on, then Utility Meter can create the day/week/month/year stats:

You could combine the two to get what you want:
Use a history stats sensor to count on time for today using the start of today as the beginning of the period, and now for the end of the period. Then use a utility meter to create a total for forever/year/week/month.


I would like to configure my home smart PID regulator before winter and since I have time now I can start to make some work :slight_smile: . I have an issue that is not so obvious to me.

In my home I have several rooms and each of them have separate valves and wall thermostat. It means that I can control each room separately with set-up temperature for example of wall thermostat or from central from HA.

House has only one source of heating system (gas boiler) that can control by ON & OFF.

Till now I had a problem to control properly rooms since it was one sensor that took control over boiler and other rooms like office or bedrooms have been to cold or to hot.

By this integrity I can make an virtual thermostat and can control each of the room that is very nice. As well virtual thermostat can control of several valves etc. including boiler as well. But my question is how can I ensure that when Virtual thermostat will take control of room (valve) will start boiler and will not off when other rooms will require boiler since it supply whole house?
And I’m not sure how to make it correct due to the goal is to keep boiler ON till each rooms will meet required temperature. After that to shutdown boiler. And as well each rooms if will need more heat from boiler have to ON boiler to be able to heat room.

Is there anyone who had such case as solve it somehow :slight_smile: ?

Hello, it all depends on how the system is supposed to operate. You may drive the valves opening directly with the virtual thermostat (with pwm: 0 ), and use an input boolean template to make a logical β€œor” so that the boiler is switched on if at least one valve is opened.

Sounds nice :slight_smile:
Do you have an example or where can I find so I could read a code and understood how it works?