Hello, I have a floor heating pump and I need to control it with two temperature sensors, that are on different pipes, the controller is ESP8266. The first condition is that the pump is turned on when the first sensor reads the water temperature above 30 degrees and turned off when it is below 29 degrees, the second condition is that the pump is turned off when the temperature of the second sensor reaches 40 degrees and turned on at 39 degrees.
I have this code below and it works until, say, the power goes out. When its power returns configuration doesn’t work, the temperature neet passing the temperature over the specified values.
How can I arrange the configuration in the ESPHome to toggle my pump on any temperature change in the specified range to turn on or off the pump? How to add a condition to check if the pump turns on or not when its temperature is in the specified values?
switch:
- platform: gpio
name: "Pin GPIO5"
id: my_switch
pin:
number: 5
inverted: true
dallas:
- pin: 15
update_interval: 15s
sensor:
- platform: uptime
name: Uptime Sensor
- platform: dallas
address: 0xA33C01D60794B728
name: "Floor heating pump"
id: my_sensor1
on_value_range:
- above: 40.0
then:
- switch.turn_off: my_switch
- below: 39.0
then:
- switch.turn_on: my_switch
- platform: dallas
address: 0x263C01D607EBA328
name: "Floor heating seperator"
id: my_sensor2
on_value_range:
- above: 30.0
then:
- switch.turn_on: my_switch
- below: 29.0
then:
- switch.turn_off: my_switch