|
楼主 |
发表于 2020-5-21 17:19:06
|
显示全部楼层
配置文件:) a+ l' m" R: E7 `, [% d" I' Q
8 R' s1 |8 L" w) k9 Y: K
esphome:! N7 N+ I& A& V X0 G' }1 w
name: home_power_monitor/ }1 h* \% ^8 r3 |4 f# g% ]
platform: ESP8266, {+ H' a. [. u6 o7 }
board: nodemcuv2+ p6 Z2 ^7 G n7 V( F/ p, N. m
% [# s. C: w0 c7 s% kapi:
; G- h' d& }7 V* b/ {6 v6 k reboot_timeout: 600s
. q: [* g2 B1 N/ X; i: }! \/ e5 Y* q3 f" x+ T0 z" T! n* ?+ {
ota:
]: [7 G, T, A" ~0 }5 z3 qcaptive_portal:
; `9 W4 C5 _3 C) }% q) J. Z/ w* `1 E0 S+ W0 D) L3 F; V* R- z: F7 Q- ~
web_server: ?9 \8 W+ S4 m$ z3 ?
5 V+ I9 |' i) k
wifi:
% b0 n; p% s' k* U ssid: XXXXX t! [ C, `4 e* F1 u
password: XXXXXXXXXXX5 d _& |- i7 E: O p( n+ F, p$ T* e& Y
reboot_timeout: 180s
" w" F9 y' O* X! _# R# g power_save_mode: none' H3 i$ R- ]8 x7 R) k; T
2 `3 r' e& [7 x/ V, B" i; T4 Muart:
/ L" s# k$ s3 _( Q9 i0 ] tx_pin: D1
2 `# K1 y% t8 t6 ^3 u rx_pin: D2
l' M& V& u. T, F* w( d baud_rate: 9600
2 I# \. s3 p( T2 `( ^9 I stop_bits: 1- \3 J- K7 N! v6 j
a# O2 t' D) `- Asensor:7 q. @6 m& n. h1 L+ S8 f2 _
- platform: pzemac
n: u7 }6 s$ }) g+ `+ h* q4 w& I current:
% l/ E. T5 q; V+ y! n id: "current"
8 k2 G# j( c) V3 j2 I name: "Home Power Monitor Current". \! A: _3 P" u" b4 h% z$ o
voltage:/ s+ p& C9 m: W8 O) ^* v: R
name: "Home Power Monitor Voltage": @! _- M6 v# Z8 g) B
power:4 r; o% f. k' r" O+ c# V
name: "Home Power Monitor Power"' I& I9 x# D! U6 ]& h6 d; I
energy:9 S& j$ b& C& N8 I$ D3 g
name: "Home Power Monitor Energy"
! s* D* ~9 G3 |# w3 u+ ^9 w; T frequency: v2 J: Q# ]7 W! E: @/ y& e7 @8 m1 _
name: "Home Power Monitor Frequency". i8 ^) A$ W# c- ^/ n
power_factor:
; b. t7 n9 q6 H+ ] name: "Home Power Monitor PowerFactor", a+ V2 m4 ?- t# Z. g, Q; N: q
update_interval: 1s7 h1 r. B3 W( [9 b; o
/ J7 d9 \2 ~ ?binary_sensor:: i, c- y" ^/ j. [% a+ J: p; s2 ~
- platform: homeassistant
+ X) j) T: j `# j2 x name: "Input Boolean From Home Assistant"7 O$ R" Z/ h0 d7 [& i
entity_id: input_boolean.state_home
" Q8 k& m2 q$ M" F# m# Z on_press:
: M0 N+ z1 ~* |. Z2 c" n2 c - sensor.integration.reset: current |
|