On Monday, March 25, 2019 at 11:41:13 AM UTC-4, Louis De Lange wrote: > > I am thinking about some workarounds for the genArchiveRecords() methods. > Since the historical data request does not contain the cost data it would > be useful to be able to pull the cost from the last record in the database > and use that when making up the historical data - not perfect but better > than empty fields. > >> if your cost is a simple multiplier that does not change with time, then why would you record it in the database?
why not record *only* the power data then apply and costs or other transformations in the reports or at the display level? if you *do* need to record costs that change with time, record them in a separate database, then combine at the report/display time or make a weewx driver that pulls spot prices for power :)
