|
|
楼主 |
发表于 2020-5-21 17:19:06
|
显示全部楼层
配置文件:
) j$ ~. r5 q5 m1 q1 s" C) v' p. o; _7 H/ ^/ t: A# M
esphome:6 ~, ^. B: J5 V" I& K
name: home_power_monitor, ^7 \' H+ O2 `4 t# i
platform: ESP8266
6 ~; S5 E7 o7 T/ ^2 v board: nodemcuv2! W4 J# ~' Q% Q" ~
: E H4 c. O1 _2 @3 N
api:
$ V- y: h5 ^& B( l reboot_timeout: 600s- D/ T* x V2 v0 T4 I1 u
! f8 E( @4 s0 y2 n1 @
ota: M' r8 ~( }1 G* o
captive_portal:
/ Q$ ]1 R' N7 k- p0 U8 J$ l
- f' m( e/ w# W0 M( u7 R. ^5 cweb_server:
( c* Z1 i+ d$ G. `
: e. @ o9 p3 q1 r: f9 s7 | u- T. `wifi:
$ W7 |0 h& a' E7 ^4 w ssid: XXXXX
1 n. u7 K* H0 ^* E5 d password: XXXXXXXXXXX: b$ t# y, u* n; W7 J+ B4 D
reboot_timeout: 180s2 Z; c& I* ?* X5 w; G
power_save_mode: none
: C4 Z2 d- B) } y B7 `* Q6 r4 B2 a4 {9 V
uart:
7 k5 O) g; x# w) j- T tx_pin: D1
* h0 `, A( U- j- f n# c) R rx_pin: D25 M" ~- N! V/ q% R
baud_rate: 9600( d& O4 [: m6 d# S& ?2 ?( l% \
stop_bits: 19 ]1 `% K6 H8 d1 j: z7 g
& Y( W c, d# U# N9 {
sensor:
- U. R) }( h- i% v( i - platform: pzemac3 }+ c# D2 X0 {* f8 _6 q
current:
- p( F% e9 b3 j: H7 T3 @ id: "current" u7 N3 V4 R F. Y5 A' Z
name: "Home Power Monitor Current"
3 Z- L0 O/ J8 g voltage:
+ M2 w* H/ @5 {/ L( s& D5 A! I name: "Home Power Monitor Voltage"" j8 I# s3 S' U) N$ Y* V6 i
power:0 s B. D9 E, I! x6 i8 M7 A/ P
name: "Home Power Monitor Power"
, S/ s; w) `+ M, |0 ?$ K: J energy:
3 s" |' r; G/ t' B8 F" }% p name: "Home Power Monitor Energy"
; B& |' T0 p6 [/ ? frequency:
0 Y- }7 e) U) k name: "Home Power Monitor Frequency"
9 S$ b% F) o5 e ] power_factor:
5 X& ?5 y' r9 g* G" w9 v( g& B- e name: "Home Power Monitor PowerFactor"
: }- b7 y+ x5 R' N2 X* w; W, P update_interval: 1s5 Y6 X$ L5 C, F$ @& K* C* W
* F- D2 l. g# ?0 ^
binary_sensor:8 ~) W" q8 h- _7 P) a, S/ X% a
- platform: homeassistant
3 z8 m7 A# v# q; y3 w name: "Input Boolean From Home Assistant"% q _ s" f; U
entity_id: input_boolean.state_home; H5 b* r, T4 U, Y
on_press:% {+ }2 y1 ?- c
- sensor.integration.reset: current |
|