-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
groundfloorhallway-energymeter.yaml
58 lines (52 loc) · 1.48 KB
/
groundfloorhallway-energymeter.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
substitutions:
device_name: "groundfloorhallway-energymeter"
friendly_name: "Ground Floor Hallway - Energy Meter"
comment: "${friendly_name} (NodeMCU ESP32S)"
default_update_interval: 60s
<<: !include boards/nodemcu-32s.yaml
<<: !include components/api.yaml
<<: !include components/bluetooth_proxy.yaml
<<: !include components/captive_portal.yaml
<<: !include components/logger.yaml
<<: !include components/ota/esphome.yaml
<<: !include components/safe_mode.yaml
<<: !include components/time/homeassistant.yaml
<<: !include components/web_server.yaml
<<: !include components/wifi.yaml
uart:
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 9600
#stop_bits: 2
sensor:
- <<: !include components/sensor/internal_temperature.yaml
- <<: !include components/sensor/wifi_signal.yaml
- <<: !include components/sensor/total_daily_energy.yaml
power_id: power_id
- platform: pzemac
id: pzemac_01
current:
name: "${device_name}_current"
voltage:
name: "${device_name}_voltage"
energy:
name: "${device_name}_energy"
power:
id: power_id
name: "${device_name}_power"
frequency:
name: "${device_name}_frequency"
power_factor:
name: "${device_name}_powerfactor"
update_interval: 1s
binary_sensor:
- <<: !include components/binary_sensor/status.yaml
button:
- platform: template
name: "${device_name}_resetenergy"
icon: "mdi:restart"
on_press:
then:
- pzemac.reset_energy: pzemac_01
status_led:
pin: GPIO2