fix(deye): transmit solarEnergyDay as watt_hours
All checks were successful
Build / build (push) Successful in 3m24s
All checks were successful
Build / build (push) Successful in 3m24s
This commit is contained in:
parent
2350a7859d
commit
495723fb32
1 changed files with 14 additions and 2 deletions
|
@ -87,7 +87,13 @@ defmodule WeewxProxy.Modbus.Deye do
|
|||
|
||||
defp handle_reading("deye/day_energy", reading, {:active, active}) do
|
||||
timestamp = DateTime.utc_now() |> DateTime.to_unix()
|
||||
data = %{dateTime: timestamp, solarEnergyDay: reading, solarEnergyActive: active}
|
||||
|
||||
data = %{
|
||||
dateTime: timestamp,
|
||||
solarEnergyDay: reading * 1000.0,
|
||||
solarEnergyActive: active
|
||||
}
|
||||
|
||||
:ok = Publisher.publish("weewx/ingest_si", data)
|
||||
|
||||
nil
|
||||
|
@ -99,7 +105,13 @@ defmodule WeewxProxy.Modbus.Deye do
|
|||
|
||||
defp handle_reading("deye/ac/active_power", reading, {:day, day}) do
|
||||
timestamp = DateTime.utc_now() |> DateTime.to_unix()
|
||||
data = %{dateTime: timestamp, solarEnergyDay: day, solarEnergyActive: reading}
|
||||
|
||||
data = %{
|
||||
dateTime: timestamp,
|
||||
solarEnergyDay: day * 1000.0,
|
||||
solarEnergyActive: reading
|
||||
}
|
||||
|
||||
:ok = Publisher.publish("weewx/ingest_si", data)
|
||||
|
||||
nil
|
||||
|
|
Loading…
Reference in a new issue