|
楼主 |
发表于 2020-5-21 17:19:06
|
显示全部楼层
配置文件:
; |3 K2 l2 c" u6 U
8 b; v$ r' T. b: i# C* K- {2 ]esphome:" E5 r2 j5 I f( z
name: home_power_monitor
% W$ m6 p1 j1 Q platform: ESP8266 x* x/ E3 ~8 `3 Q, Q6 d- ]
board: nodemcuv2
% T( `) M5 R0 V& {" \8 M" D. t) w0 ^! `6 g
api:# Z% U3 J( R7 I+ l# @
reboot_timeout: 600s
' _& e5 i( w# @7 m! n4 Y" m- K
+ @9 k' u( c8 r6 a# q7 Nota:/ m' u8 @$ ?. L% S/ u) a
captive_portal:
! r/ I% j* z9 P7 b9 ?/ ?/ d3 n; e9 u3 c, I( t9 Z' x
web_server:
7 {7 Y3 U' Y: f! A) @6 h
2 d2 c2 }" U. N3 F8 j, A' Vwifi:4 P! B& p$ K4 G6 A4 N
ssid: XXXXX: @% A/ y2 B' j0 p9 u l) ]' @& ^; L+ m
password: XXXXXXXXXXX/ z7 Z9 }" t3 J7 A( Y
reboot_timeout: 180s2 O- z) v# i1 Q( g3 _1 L; s. x
power_save_mode: none5 N. s, q7 q* R- }; H/ s9 F# p
, b( C; Q8 E* i7 `9 B
uart:; t4 o4 S4 }7 X8 b2 @
tx_pin: D1' x- x8 r$ v- ~; A4 o
rx_pin: D2
) C" D, f0 L3 K" l! l1 ~ baud_rate: 9600
% ^" Z! f% ]2 B6 o4 y1 ?: c2 c% l stop_bits: 1
) ~; [: m: y; f4 v2 [9 P2 n% i- \1 ^& ^ K0 n$ `7 K7 m2 Z( B
sensor:2 F/ O: h! Q& ~* J
- platform: pzemac) p- T( S) \2 y) y% C
current:" X: Z- O5 n a6 _4 f* I3 k
id: "current"
3 n, Y5 g: _; B# j5 [& i- c name: "Home Power Monitor Current"8 O7 `1 v, g ?6 Y2 L& g
voltage:" f& H2 [. i0 j. |) W! R
name: "Home Power Monitor Voltage"
% s$ e7 U# A) P power:
, i* f' W2 y$ O$ M# V# S/ l& T name: "Home Power Monitor Power"% ~2 C5 ]% ]+ g( M: y `3 x, E v9 }( v
energy:, g+ B5 |9 }0 |* a
name: "Home Power Monitor Energy"
0 [' L3 g' Y' O6 p& |/ W/ K1 T frequency:
4 R3 n- Q! N0 E0 K+ c, b) Y2 v* X5 V name: "Home Power Monitor Frequency"
* \0 }; Z2 ]2 _# |( e6 p power_factor:- y) a0 C, O. t; h. k
name: "Home Power Monitor PowerFactor"( W% Z; \6 t. `) s
update_interval: 1s
( O+ K' ]6 }( S
2 x9 |& ]! x( _% w, ^6 Obinary_sensor:! g1 w3 o) {, ^8 {( {
- platform: homeassistant
6 ?& T) L8 @ W4 S2 u6 X name: "Input Boolean From Home Assistant"
8 d5 t1 @/ G7 e% h6 z0 A1 N7 m entity_id: input_boolean.state_home$ A; S6 Z# q3 u4 p& e+ }
on_press:
r" V0 E, i+ z, o - sensor.integration.reset: current |
|