Can I create a target based on external temperature forecasts? #54
-
|
How can I create a target based on external temperature forecast? Use case So how do I go about importing a temperature forecast in the 30-minute slots that are required by this integration? Thoughts I don't know how to convert that into 30-minute chunks e.g. using a mid-point calculation. So in the above example the forecast for 15:30 could be 15.1. Is this feasible? Another option is for the target timeframes to handle 1hr increment instead of the current 30-mins - is this possible, I don't see any option for it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Sorry for the incredibly long time for a response to this question. I'm sure you've already found an answer, but I've added a blueprint at https://github.com/BottlecapDave/HomeAssistant-TargetTimeframes/blob/develop/_docs/blueprints/target_timeframes_weather.yaml for having a weather based data source. This will request hourly forecasts and spread the desired value across the two periods (e.g. for a forecast of 15:00, it will duplicate the desired value at 15:00-15:30 and 15:30-16:00). This is because this forecast is for the whole hour and there is no indication of when the temperature changes from one to the next so will always be an estimation. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot - just tried it and it works well - really appreciate this. The simple time-shift by 30 mins is adequate for my purposes. I had not managed to create anything yet so this is a big step forward for me. I today attempted to reverse enginer one of your other blueprints to figure out the logic but the jinja code is much more advanced than I have attempted so far. I then asked ChatGPT to explain the code of your Octopus+Free+Carbon combo and it broke it done very nicely for me - nice technique to normalise and then combine the various sensors to get a new value. Let me have a play, I might need to create a combo for my requirement as I don't want to favour temperature sensors over cheap rate. e.g. substitute the carbon in your Blueprint for temperature. Last year Octopus gave me a lot of cheap rate during the day time provided my EV was plugged in, so would not want to miss out on that. Having said that Octopus have improved the way IOG dispatches work so I may not get get many daytime slots going forward. Question for you @BottlecapDave , I have created my Target Timeframes based on the Octopus Import blueprint, not realising there was one that also combined Free events. Is there a simple way to migrate from one to the other while still preserving the target sensors I had created? |
Beta Was this translation helpful? Give feedback.
Sorry for the incredibly long time for a response to this question. I'm sure you've already found an answer, but I've added a blueprint at https://github.com/BottlecapDave/HomeAssistant-TargetTimeframes/blob/develop/_docs/blueprints/target_timeframes_weather.yaml for having a weather based data source. This will request hourly forecasts and spread the desired value across the two periods (e.g. for a forecast of 15:00, it will duplicate the desired value at 15:00-15:30 and 15:30-16:00). This is because this forecast is for the whole hour and there is no indication of when the temperature changes from one to the next so will always be an estimation.