Ready for synching test

This commit is contained in:
2026-01-13 11:31:56 +01:00
parent 57e11fc539
commit e21474e733
8 changed files with 2033 additions and 268 deletions

77
powermeter.yaml Normal file
View File

@@ -0,0 +1,77 @@
esphome:
name: powermeter
friendly_name: PowerMeter
esp8266:
board: esp01_1m
# Enable logging
logger:
web_server:
port: 80
# Enable Home Assistant API
api:
encryption:
key: "sRMMr/ojhCUtZukAFSRT/fZpvI0bcTPHAqs0CzXY/q0="
ota:
- platform: esphome
password: "8383401f9c2ff3b99a166c2782307e8b"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.20.152
gateway: 192.168.20.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Powermeter Fallback Hotspot"
password: "kmSJk2j8Lpak"
captive_portal:
sensor:
- platform: pulse_meter
name: 'Power'
id: sensor_pulse_meter # Optional ID, necessary if you want to calculate the total daily energy
unit_of_measurement: 'W'
device_class: power
state_class: measurement
accuracy_decimals: 0
internal_filter: 100ms
pin:
number: 12
inverted: true
mode:
input: true
pullup: true
filters:
- multiply: 60
total:
name: "Electricity Total"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
- platform: total_daily_energy
name: 'Total Daily Energy'
id: sensor_total_daily_energy
power_id: sensor_pulse_meter
unit_of_measurement: 'kWh'
state_class: total_increasing
device_class: energy
accuracy_decimals: 3
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
time:
- platform: homeassistant
id: homeassistant_time