hello i have a sensor that keeps track of the number of hours i use spotify. But it stops/resets every day. how do i get this to a weekly overview? is there perhaps a helper that sums this value?
You can try try to use history stats? There are a few examples in
BTW, I also have daily (using the same hist_stats) and can show them nicely in a graph too (max days is limited by recorder), depend a bit what you need/want…
You appear to have a sensor that reports daily usage (i.e. it resets every day). Use the Utility Meter integration to create a weekly sensor.
utility_meter:
weekly_spotify_usage:
source: sensor.spotify
name: Weekly Spotify Usage
cycle: weekly
Question… would this trigger regardless of any state of the sensor.spotify? i.e. history stats ‘demands’ the state value