|
楼主 |
发表于 2020-5-21 17:19:06
|
显示全部楼层
配置文件:
5 z) V1 S5 h# X' l. E7 s
" H$ `, U' v F. l Nesphome:
+ m7 n5 X5 S* u5 X' ~% a# T3 z name: home_power_monitor
: C/ e/ J9 \) N3 U+ j( F: l platform: ESP8266
# u5 c1 S7 ]. t4 v- | board: nodemcuv2
1 j' L- A A4 V
2 z% N+ E! U7 `( f: Vapi:
! O/ @" G! A1 S+ f* j# d5 K. W reboot_timeout: 600s# p7 i6 P' T# ^9 h! P
$ b. J: J+ h, H1 Q5 N
ota:
. ? ? o* {' A ]# w! d' w& Zcaptive_portal:/ H# V' s! Z) Y
; U2 d" Y v% m6 C/ _web_server:
1 Z+ A9 |4 i: z0 U3 ]) l. {. a1 J; J
wifi:
/ t( o; L; S: y# b+ C; c! n ssid: XXXXX
4 z4 H7 x. Y# \! Y! Q password: XXXXXXXXXXX
4 g' ~# s' V: h" ^ reboot_timeout: 180s
) w+ q. j; b$ m1 d' |! X power_save_mode: none! D" y6 h. J4 [9 N4 B, t
8 K7 _. I- A2 T f: ?8 F2 Juart:% t$ H5 V' }, t& q' }& z' Z J2 u5 e
tx_pin: D1* W! P2 i5 U7 I+ [9 M2 b
rx_pin: D2' j: G: p: M6 \& g* ~5 d3 `
baud_rate: 9600
' ]8 Z8 b9 }+ k6 z: n( Q; l stop_bits: 12 R* T! ^/ N. N2 ^: I
! a9 N# K% p% Z0 N, Tsensor:2 v5 g2 [/ p2 U, W
- platform: pzemac# C [# `( s2 @. F
current:! r' s6 y% S& C) I
id: "current"
$ q& C* @/ w2 Y" T* j! N# A9 K name: "Home Power Monitor Current"
1 k9 }& W% y& x9 Q& n voltage:6 M+ u7 d( ~6 ~9 H, y+ q
name: "Home Power Monitor Voltage"
8 U' V3 ^/ Z& j! c4 w power:9 u8 L0 n! V- E) x- m1 U
name: "Home Power Monitor Power"
4 l Z: m0 S4 b! l! O1 T; c4 p energy: d8 j" e0 U4 |. V4 }, m
name: "Home Power Monitor Energy"4 D2 C: G/ M; V9 \6 p5 y8 ?) R; {* z
frequency:
* p# h1 u( f: ?, i7 @, h name: "Home Power Monitor Frequency", K5 g+ x" a2 S% D) `8 K
power_factor:
- h ]- r, u$ J' V& _/ Q name: "Home Power Monitor PowerFactor"
' h9 u; x" }- O5 q update_interval: 1s
. e. {8 X8 d0 G) K2 s" N; Q: V( t2 \) r2 Y4 `. B% [
binary_sensor:
" X4 l0 o3 P6 r - platform: homeassistant
9 u) Y# z: N% V/ ^ name: "Input Boolean From Home Assistant"
6 [ l- n6 a! J+ z- c1 d entity_id: input_boolean.state_home+ @4 t( q5 L8 {. w: m( ]
on_press:9 C1 t& n w# _) b
- sensor.integration.reset: current |
|