esphome:
name: PZEM_AC
comment: "pzem AC"
area: "AC"
# on_boot:
# then:
# - pzemac.reset_energy: pzemac_wardrobe
esp8266:
board: esp01_1m
# Enable logging
logger:
baud_rate: 0
web_server:
port: 80
# Enable Home Assistant API
api:
ota:
- platform: esphome
wifi:
ssid: "SS2"
password: "66666666"
use_address: 192.168.88.27
# Optional manual IP
manual_ip:
static_ip: 192.168.88.27
gateway: 192.168.88.1
subnet: 255.255.255.0
dns1: 8.8.8.8
dns2: 1.1.1.1
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "EspZEM"
password: "66666666"
captive_portal:
uart:
tx_pin: RX
rx_pin: TX
baud_rate: 9600
stop_bits: 1
modbus:
button:
- platform: restart
name: "Restart device"
sensor:
- platform: pzemac
address: 1
current:
name: "Current"
id: "pzem_current"
unit_of_measurement: "A"
voltage:
name: "Voltage"
id: "pzem_voltage"
unit_of_measurement: "V"
energy:
name: "Energy"
id: "pzem_energy"
unit_of_measurement: "kWh"
accuracy_decimals: 2
filters:
- lambda: return x / 1000.0;
power:
name: "Power"
id: "pzem_power"
unit_of_measurement: "W"
frequency:
name: "Frequency"
id: "pzem_frequency"
unit_of_measurement: "Hz"
power_factor:
name: "Power Factor"
id: "pzem_power_factor"
unit_of_measurement: "%"
update_interval: 10s
id: "pzemac_roof"
- platform: wifi_signal
name: "Wi-Fi Signal"
update_interval: 60s
binary_sensor:
- platform: status
name: "Connection status"