-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathesphome-two-meters.yaml
57 lines (49 loc) · 1.3 KB
/
esphome-two-meters.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
---
substitutions:
device_class1: 'water'
device_class2: 'gas'
device_icon1: 'mdi:water'
device_icon2: 'mdi:meter-gas'
volume_unit1: 'gal'
volume_unit2: 'ft³'
prefix1_name: 'Water '
prefix1_id: 'water_'
prefix2_name: 'Gas '
prefix2_id: 'gas_'
gpio_led: GPIO2
i2c1_sda: GPIO4
i2c1_scl: GPIO5
i2c2_sda: GPIO12
i2c2_scl: GPIO14
flow_update_interval_seconds1: '10'
flow_update_interval_seconds2: '30'
packages:
meter1: !include
file: esphome-magnetometer.yaml
vars:
device_class: ${device_class1}
device_icon: ${device_icon1}
volume_unit: ${volume_unit1}
prefix_name: ${prefix1_name}
prefix_id: ${prefix1_id}
i2c_sda: ${i2c1_sda}
i2c_scl: ${i2c1_scl}
flow_update_interval_seconds: ${flow_update_interval_seconds1}
meter2: !include
file: esphome-magnetometer.yaml
vars:
device_class: ${device_class2}
device_icon: ${device_icon2}
volume_unit: ${volume_unit2}
prefix_name: ${prefix2_name}
prefix_id: ${prefix2_id}
i2c_sda: ${i2c2_sda}
i2c_scl: ${i2c2_scl}
flow_update_interval_seconds: ${flow_update_interval_seconds2}
switch:
# LED flashes faster/slower as magnet rotates on water meter
- platform: gpio
id: led
pin:
number: ${gpio_led}
inverted: true