-
Notifications
You must be signed in to change notification settings - Fork 5
/
underfloor_heating_pump.yaml
68 lines (62 loc) · 1.93 KB
/
underfloor_heating_pump.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Underfloor heating pump controller integration Home Assistant
#
# This file adds two sliders for setting the threshold temperatures
# to switch the pump on and off.
# Automation's are added to synchronize the sliders with the values
# inside the controller. The controller stores these values in flash
# so it can run without Home Assistant.
input_number:
# Slider for setting temperature to switch off the pump
threshold_temp_off:
name: Threshold Off
unit_of_measurement: "°C"
min: 0
max: 50
step: 1
# Slider for setting temperature to switch on the pump
threshold_temp_on:
name: Threshold On
unit_of_measurement: "°C"
min: 0
max: 50
step: 1
# Synchronize controller and sliders
automation:
- alias: sync threshold on with controller
hide_entity: true
trigger:
- entity_id: sensor.threshold_on
platform: state
action:
service: input_number.set_value
data_template:
entity_id: input_number.threshold_temp_on
value: "{{ trigger.to_state.state | int }}"
- alias: submit new 'on' value to controller
hide_entity: true
trigger:
- entity_id: input_number.threshold_temp_on
platform: state
action:
service: esphome.pump_controller_threshold_on
data_template:
value: "{{ trigger.to_state.state | int }}"
- alias: sync threshold off with controller
hide_entity: true
trigger:
- entity_id: sensor.threshold_off
platform: state
action:
service: input_number.set_value
data_template:
entity_id: input_number.threshold_temp_off
value: "{{ trigger.to_state.state | int }}"
- alias: submit new 'off' value to controller
hide_entity: true
trigger:
- entity_id: input_number.threshold_temp_off
platform: state
action:
service: esphome.pump_controller_threshold_off
data_template:
value: "{{ trigger.to_state.state | int }}"