Is it possible to go direct to a 1 Week view (last 7 days) via URL (standard Emoncms read only) without entering start and end? I use the URL to embed the graph view in my Home Assistant mobile view and have been clicking ‘Week’ every time in it, but seen today you can get a direct link to the view, but it is via ‘Daily’ and start/end dates. Would it be possible to get a ‘Weekly’ mode to allow to go to it without entering start/end dates? Would be easier for me to be able to just enter a hard coded URL for HA than work out if I can dynamically create the URL w/timestamps.
If you mean a rolling last seven days, rather than one data point per calendar week, a saved floating-time graph looks like a way around generating timestamps in HA.
I checked the current Graph module source, including the JavaScript currently served by the hosted Emoncms site. Selecting the “1 Week” time window sets a floating time range. When that graph is saved and loaded again, the code moves its saved duration forward to the current time. The embed view accepts a saved graph through graphid.
So I’d try selecting your feeds, choosing “1 Week” with the time-window selector, saving it as a separate graph, and embedding that saved graph by its ID. Avoid entering fixed Start/End dates for this test, because that path sets a fixed rather than floating window.
I haven’t tested this in your HA view. Are you embedding a saved Graph-module graph already, or using a different view? Please redact any API key if you share the URL. The “Weekly” entry under data Type is a separate setting from the “1 Week” time window.
Sorry yes that was a bit ambiguous, I mean I would like a way to always load the last 7 days, like you get with the ‘1 Week’ date picker.
Currently I have a ‘Webpage’ dashboard in HA to display it, it just takes a URL and renders the page as a whole page dashboard. Most of it fits nicely on the page on my phone, but a months worth of daily bars are too tightly packed, so I switch to the week view.
The URL is just using my public emon URL ( Emoncms - app view ). Looking at it in more detail, the page is actually the MyHeatpump ‘app’ which is more fully featured than a graph would be? I want to retain the clicky elements of the app to drill into days and see the detail breakdown.
I did look at that, but that gives the more detailed graph, I like the daily summary with a bar per day, just want 7 of them rather than a months worth if I can.
If its anything more than a trivial change, then don’t worry, I was hoping I could achieve it with URL parameters already available but with it being fixed as I’m not sure HA Webpage dashboard can handle dynamic URLs.