tillprochaska / honeypot

MIT License
1 stars 0 forks source link

[WIP] 26 accumulate sensor readings when importing #32

Closed tillprochaska closed 5 years ago

tillprochaska commented 5 years ago

This PR closes #26.

This PR allows to set a :accumulate option to sensors set in WolfWaagenApi::Import::SENSOR_TYPES. If set to either :daily, :monthly, :weekly, :quarterly, or :yearly, sensor values of the specified interval will be summed up when importing new values. This is handy in case the API returns a change (e. g. how much the yield has grown in the past hour), but editors do want to use total values (e. g. the total yield of the current day) in the story.board.