|
|
配置文件:
* q) J! u0 Y) }# u4 O$ o9 B2 t' `: i- C9 R# n3 N7 \
esphome:/ w/ K' n# F3 e
name: home_power_monitor
% m* [2 b1 e+ I: c1 ] platform: ESP8266
8 Q, N5 ]" r# c0 l0 y; T/ w7 @ board: nodemcuv2
+ n4 N* s2 C5 h, J
1 h& z4 r1 V% x- @* q$ Bapi:2 M7 B6 S2 I6 a3 R
reboot_timeout: 600s
8 A: L8 E) k6 z @# }% I" `# K" L! J+ F
ota:5 r; p5 P6 V n0 R$ h. @1 G% Q, G" O
captive_portal:
3 N) s4 o8 U( }! C) n; U" y( a9 K7 ~3 s# {2 J$ b k' r4 h
web_server:
7 m- r P& w/ s9 l8 P n/ h, u( I' G$ u+ i2 n
wifi:3 \3 W- z, ?7 s A5 u4 L
ssid: XXXXX
. S) f; [; O$ Z9 s7 i! H password: XXXXXXXXXXX
1 v, u, d+ c6 _+ \* L, n reboot_timeout: 180s
8 X' {) `8 r" b* Q% B! C power_save_mode: none
* \' @ v/ w) h
3 B$ u; u3 r R: E2 a& Uuart:% }4 {7 R" H$ h2 |. t
tx_pin: D1
9 Z1 M+ U6 Q: }+ T5 u' O rx_pin: D2
, c0 t- v: H/ H E( ?4 a baud_rate: 96004 Q/ g. T& g9 M) v
stop_bits: 1% m. ~+ `9 r8 O4 _! A* t9 M* Z G* `: U
; e+ ^# C$ M" ]( Q' E0 x7 x
sensor:2 S4 d: o% |! [1 B& a. [
- platform: pzemac5 e2 }, F; N9 `1 l" k @& q. X e
current:
( q5 j B, ]8 }, o$ p, O { id: "current"
* u6 C) r5 C1 | name: "Home Power Monitor Current"& ?$ K9 h' N' I6 B, P; B/ ^/ g
voltage:( X2 L& }2 T' G9 q' P; P
name: "Home Power Monitor Voltage"
' O% z7 z }5 t0 C* t2 M7 T/ k8 |% H power:
0 Y3 B3 Y7 O0 ?/ q! y: Q name: "Home Power Monitor Power"% O0 J9 i0 I% ?: ?% Z
energy:4 J9 e1 l M9 A3 ?& Q- e3 }6 X# p& G
name: "Home Power Monitor Energy"/ s% \6 d7 X1 t$ R
frequency:* J8 ?) ]" X/ K
name: "Home Power Monitor Frequency"
: Q' r) ~* Q- U9 C" ]: l power_factor:
) o0 e/ _' I% w2 R name: "Home Power Monitor PowerFactor"
( l* I% v2 G% ~! H7 p update_interval: 1s5 q4 h+ d( b! W m! Q o- ^
, l2 C9 V S% j9 H! q
binary_sensor:7 ~3 Q" A" a! H7 j* d1 K& Z
- platform: homeassistant7 M6 H4 L# P, a+ m. P1 ]1 l
name: "Input Boolean From Home Assistant": \& N( T) G# N) u8 D* f! ^3 I0 B
entity_id: input_boolean.state_home0 ^& ^" _/ ~/ _* }
on_press:
2 K' J# P3 u$ _* e- N: Y) l - sensor.integration.reset: current |
|