forked from nuttytree/ESPHome-Devices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pool-pumps.yaml
116 lines (109 loc) · 2.62 KB
/
pool-pumps.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
substitutions:
device_id: pool-pumps
device_name: Pool Pumps
board: modwifi
ip_address: !secret pool-pumps-ip
ota_pwd: !secret pool-pumps-ota-pwd
api_pwd: !secret pool-pumps-api-pwd
ap_wifi_pwd: !secret pool-pumps-ap-pwd
packages:
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ./components
components: [ pool_controller ]
i2c:
sda: GPIO12
scl: GPIO14
pool_controller:
pump:
switch_id: pool_pump
current_id: pool_pump_current
min_current: 3.45
max_current: 6.75
max_out_of_range_duration: 5s
cleaner:
switch_id: pool_cleaner
current_id: pool_cleaner_current
min_current: 4.50
max_current: 5.30
max_out_of_range_duration: 10s
sensor:
- platform: ade7953
voltage:
name: ${device_name} Voltage
id: voltage
filters:
- multiply: 2
current_a:
name: Pool Cleaner Current
id: pool_cleaner_current
filters:
- lambda: "return x < .1 ? 0 : x;"
current_b:
name: Pool Pump Current
id: pool_pump_current
filters:
- lambda: "return x < .1 ? 0 : x;"
active_power_a:
name: Pool Cleaner Power
id: pool_cleaner_power
filters:
- lambda: "return x < 1.0 ? 0 : x * 2;"
active_power_b:
name: Pool Pump Power
id: pool_pump_power
filters:
- lambda: "return fabs(x) < 1 ? 0 : fabs(x) * 2;"
update_interval: 1s
- platform: ntc
sensor: temp_resistance_reading
name: ${device_name} Temperature
unit_of_measurement: "°C"
accuracy_decimals: 1
icon: "mdi:thermometer"
state_class: measurement
calibration:
b_constant: 3350
reference_resistance: 10kOhm
reference_temperature: 0°C
- platform: resistance
id: temp_resistance_reading
sensor: temp_analog_reading
configuration: DOWNSTREAM
resistor: 32kOhm
- platform: adc
id: temp_analog_reading
pin: A0
- platform: total_daily_energy
name: "Pool Pump Total Daily Energy"
icon: mdi:flash
power_id: pool_pump_power
method: left
filters:
- throttle: 1min
- platform: total_daily_energy
name: "Pool Cleaner Total Daily Energy"
icon: mdi:flash
power_id: pool_cleaner_power
method: left
filters:
- throttle: 1min
status_led:
pin:
number: GPIO0
inverted: yes
switch:
- platform: gpio
pin: GPIO4
name: "Pool Pump"
id: pool_pump
icon: mdi:pump
restore_mode: Always Off
- platform: gpio
pin: GPIO15
name: "Pool Cleaner"
id: pool_cleaner
icon: mdi:robot-vacuum
restore_mode: Always Off