Duplicate sensor to avoid losing data during hourly updates


I use met.no for temperature forecast and display it in an apexchart (overlayed ontop of electricity prices :thinking:).
The apexchart have a fixed starting time at 00:00 and displays 48 hours.

My “issue” is that my “weather.home_hourly” updates hourly and therefore the 24h temperature forecast “moves across” the chart during the day.

My aim is to somehow make a copy of the “weather.home_hourly”-sensor at 00:30 and then 30mins past every hour during the day, copy the lastest value from the “real” “weather.home_hourly”-sensor over to the static copy of “weather.home_hourly”-sensor.

I have searhed high and low and can’t figure out how to accomplish this.
Would be very happy if someone could point me in the right direction :slight_smile:

What I have now:

What I hope to get:

I havn’t failed :sunglasses:, I just found another way that doesn’t work :rofl:

Right, so the solution nasty workaround I tried was to make a whole bunch of input_numbers, and then at 00:30:00 I would make an automation to set the value of the first 24 input_numbers and then every hour I would have a new automation to set the value of yet another input_number…
BUT, most of my programming experience comes from the C-world and I thought that an input_number was A value, but it turns out that an input_number has a history and thus not just A value, but LOTS of values… and I realized this is not gonna work :sob:

I did see something weird though, at some point I got the met.no integration installed twice (dunno how :thinking:) and there is a cloud symbol on the integration and then it hit me… If I could control cloud sync for one of the met.no integrations and only let is sync in the 00:30:00-00:45:00 timespan, then I could just show the 2 integrations with the same color setup and BAM… time to try and disable cloud sync! :smiley:

Right, so can’t find any documenation on how to disable cloud connectivity for a single entity and can’t find any automations events or similar to disable entity updates. (guess I can uninstall the 2nd met.no integration now :slight_smile: )

So, onwards to the next possible solution… Which I don’t know what is yet.

I finally solved this with assistance from sheminasalam and vingerha. (in this post: Set weather.home_hourly.[0].datetime in an automation - #2 by sheminasalam)

So instead of this:

I now have this:

1 Like