-
Notifications
You must be signed in to change notification settings - Fork 0
/
boiler-relay.yaml
83 lines (75 loc) · 1.74 KB
/
boiler-relay.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
substitutions:
device_name: boiler-relay
device_name_underscore: boiler_relay
relay_pin: GPIO12
button_pin: GPIO0
delay_time: 3min
update_interval: 60s
packages:
device_common: !include .device_common.yaml
delayed_start: !include .sonoff_delayed_start.yaml
esphome:
name: ${device_name}
platform: ESP8266
board: esp01_1m
logger:
baud_rate: 0
uart:
rx_pin: RX
baud_rate: 4800
parity: even
status_led:
pin:
number: GPIO13
inverted: yes
web_server:
port: 4576
ota: false
sensor:
- platform: cse7766
current:
name: "Boiler Current"
id: "boiler_current"
filters:
- throttle_average: ${update_interval}
voltage:
name: "Boiler Voltage"
id: "boiler_voltage"
filters:
- throttle_average: ${update_interval}
power:
name: "Boiler Power"
id: "boiler_power"
filters:
- throttle_average: ${update_interval}
on_value_range:
- below: 10.0
then:
- binary_sensor.template.publish:
id: boiler_state
state: "OFF"
- above: 10.0
then:
- binary_sensor.template.publish:
id: boiler_state
state: ON
energy:
name: "Boiler Energy"
id: "boiler_energy"
filters:
- throttle: ${update_interval}
- platform: total_daily_energy
name: "Boiler Total Daily Energy"
power_id: "boiler_power"
id: "boiler_daily_energy"
filters:
- throttle_average: ${update_interval}
- multiply: 0.001
unit_of_measurement: kWh
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
binary_sensor:
- platform: template
name: "Boiler state"
id: boiler_state