|
楼主 |
发表于 2020-5-21 17:19:06
|
显示全部楼层
配置文件:
2 U" ~. C1 M: `# q
4 ?- j/ p, \2 p8 h4 yesphome:
; v. I- _4 P/ ]! H' s2 c @1 O name: home_power_monitor
) g% h$ O k: Y7 [ platform: ESP8266
* F# Z, ~0 {; W# f$ R5 H/ S+ F board: nodemcuv2' F" S5 \$ t, O8 g+ o. P, e- v
; b/ k# B3 F2 k1 c( B2 C$ R
api:
; n5 P4 F- ~# @( p reboot_timeout: 600s
! R5 Z' C& C1 n9 g/ g7 P" e0 e) Q' k% }" {9 U" O( n, U
ota:. U4 ?) A- @: r( Y1 o7 I
captive_portal:
! i2 R& ?; P& I% B* A$ {
- f F7 V# ~; `. Nweb_server:
/ {1 F. J t3 w' Q+ @) X
5 ]& t2 U# ]2 p# V5 ?wifi:
: A( g6 Y4 w9 o ssid: XXXXX0 p( X F6 s' d* F/ R
password: XXXXXXXXXXX
2 o' q) i5 @- Y3 D0 {. j3 ?8 q reboot_timeout: 180s0 m0 G5 U, E* y1 f4 ~: @* G
power_save_mode: none
5 b" D" c# q" f
4 b8 l% A3 G; s# Z7 h# |) Guart:
: C* G) ^2 V3 F7 W- r$ n tx_pin: D1
, E1 Q& \1 b3 y* e( o N# J rx_pin: D2) V' W: v& I- _
baud_rate: 9600% w3 ~: L: @- b& {; n5 V$ ~- _
stop_bits: 1
: F: R, P5 ^9 {+ e9 e2 ^; e
- b4 B4 Z* ~/ ~( [2 Wsensor:. H0 c( S. [- I+ C) T
- platform: pzemac
, I7 f, @* T/ p3 w9 A4 w current:' }0 b" V5 Z7 @. y- s
id: "current"
3 Y" a! K! M! p1 d. ] name: "Home Power Monitor Current"
+ p5 [* E* a z8 v voltage:
9 U% B# M9 c0 g7 } name: "Home Power Monitor Voltage", Y" {& N0 j9 y0 H* Q7 _1 d
power:! h+ P& C+ ]0 Q! X: `7 i% e
name: "Home Power Monitor Power"
+ e, |- I9 w4 q% Z0 Z energy:1 r9 c7 M6 j: d$ y
name: "Home Power Monitor Energy"
. {* ?6 T7 Y. n C' } frequency:% ?8 l4 `3 b @6 h/ `3 [
name: "Home Power Monitor Frequency", p* G; T8 n# l! w
power_factor:* ~- L# k: c1 P' t! c
name: "Home Power Monitor PowerFactor"' i3 J' J6 f# o# N7 y0 n
update_interval: 1s: C t s5 s! w& _0 N# f
" q- \( S6 ^3 J) Q* {
binary_sensor:: ^2 Q3 A; D7 n" B% |, V0 Q
- platform: homeassistant% X+ W; A: T' W
name: "Input Boolean From Home Assistant"$ F% @ v" W9 u6 W' A* Y
entity_id: input_boolean.state_home
$ p+ x! `& a5 V on_press:: Q2 s* u+ }6 K# d# b! ]' e& V
- sensor.integration.reset: current |
|