Hi, I wish to show the power in Watt, and then I wish to calculate daily energy in KWh (so I need the sensor in KW), is it possible to have both in ESPhome code?
sensor:
- platform: wifi_signal
name: " AC power plug WiFi Signal"
update_interval: 60s
- platform: uptime
name: " AC power plug Uptime"
- platform: hlw8012
update_interval: 2s
sel_pin: 5
cf_pin: 14
cf1_pin: 13
current:
name: " AC Current"
voltage:
name: " AC Voltage"
power:
name: " AC Power"
id: ac_power_plug_power
filters:
# Multiplication factor from W to kW is 0.001
# - multiply: 0.001
unit_of_measurement: W
on_value_range:
- above: 4.0
then:
- light.turn_on: led
- below: 3.0
then:
- light.turn_off: led
- platform: total_daily_energy
name: " AC Total Daily Energy"
power_id: ac_power_plug_power
Thanks, I wish to have everything inside ESPhome, (I would then use that value to calculate daily energy inside ESPhoime), having Esphome+HASS is, for me lots of additional maintenance
That worked, thanks for the quick response!
One more question, rounding the value should result in a whole number right?
But im still getting a value like: 124.866.
Or do i have to use a different function for this?