|
|
配置文件:
`; P) @/ j+ ]! j M, i* Z: e- Y) G, P3 M: h" A5 L: C
esphome:
* j: J) {% I, P# p( Y* b name: home_power_monitor
6 y6 Z: h6 r+ g( N2 |. | platform: ESP8266
( t4 f, C9 K% ^$ \$ T, ?# E board: nodemcuv2
. [9 x' _! }4 `2 v( d: B- x, E/ m( g; u
api:6 v- S8 y; e3 k, o1 J
reboot_timeout: 600s# I# H: u) V6 f$ J
/ ~, a2 A" B3 t; o9 _) h9 a: G1 F1 b7 `
ota:
6 b! k, P( X; e5 Ycaptive_portal:
: f! D) M0 p9 j5 _- {7 b+ ~) n
- |" p/ l8 x6 L1 [# T( z" N% F2 \& rweb_server:5 v9 I, C ?$ z0 M3 d
0 M4 A4 S8 d/ [/ V O7 C6 t6 ^
wifi:
, R& H! h3 G$ W: S7 B ssid: XXXXX
7 ~: N* n- p+ t6 ~5 X password: XXXXXXXXXXX
i% S& q: O& ~0 U$ _ reboot_timeout: 180s4 {. V1 X2 W8 N, }/ Q% n7 W& t
power_save_mode: none
& K% K3 _& M8 B4 n! u3 r! W+ \/ ?0 ^8 a& B
uart:
- O# J: U/ x: @ tx_pin: D1
. c( Q q! u1 o rx_pin: D2 H7 p4 j- W- p0 x
baud_rate: 9600
1 r9 [) x: {( ]/ C stop_bits: 1
9 m0 T9 `3 l, I1 o9 w
+ r9 F: S3 c2 i. Wsensor:
( J/ \6 j, M8 ~. F - platform: pzemac
6 Q- @7 Z# L* b current:; H! c4 V8 M9 |; ?8 d) n! C
id: "current"
/ J( F5 A5 ~: D3 A' C name: "Home Power Monitor Current"
0 f7 v# w6 ^+ Y* |6 `7 R6 N voltage:
: W' B P* _# t+ L4 \% } name: "Home Power Monitor Voltage": P% l8 K5 ?- E) N5 Y
power:
' }. z' c1 }! |4 }" m5 c name: "Home Power Monitor Power"4 o' Q' P; {* G5 O$ x6 E
energy:
% I' _# n* c' c0 @ s' p name: "Home Power Monitor Energy"3 V9 f$ t, {4 ^7 _: d; j2 a0 S; I
frequency:
2 I9 [, Z3 w% D5 L6 s8 {+ \ name: "Home Power Monitor Frequency"
, k. U8 o. ?" `5 ~2 T power_factor:2 F, W. p. ~: q+ ^: m
name: "Home Power Monitor PowerFactor"
0 I8 o$ E$ l6 P, d4 V update_interval: 1s
, d; }+ R7 L- D0 \: r& F' L7 Y) T& b% n0 z, J4 w' [
binary_sensor: d8 x& t% w+ S' K8 w
- platform: homeassistant+ t1 A7 s/ R+ ^5 [+ b* g2 ?; Z" `" [# X
name: "Input Boolean From Home Assistant"! \9 Q* u3 _- L& D; N: K
entity_id: input_boolean.state_home
$ B& W/ d7 L! P6 C5 M, b on_press:
7 ^$ G# I D8 `% X# ] - sensor.integration.reset: current |
|