Proposal: The removal of target rate sensors from the integration #1305
Replies: 38 comments 49 replies
-
|
Well I think it makes sense. The target rate sensor is a really powerful idea and it really helps you do clever stuff with tariffs like agile. Obviously it would be a breaking change but the group of users who are actually using it are likely going to be smart enough to handle the migration. I;m not using the new integration yet but I will look to switch to it soon. I notice the target_timeframes.update_target_timeframe_config action. Looks powerful, but it would be great to have an optional parameter as an adjunct to target_look_ahead_hours that is something like target_find_hours_before_datetime as it were. I want to be able to have a UI where I choose how many hours I want to charge and what time I want it done by - that can be done with this service call but I'd need to do some datetime math. as an aside, did you happen to see my post about my rates graph Lovelace card? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the detailed explanation. This move seems entirely logical from a maintenance and flexibility standpoint. Consolidating the feature into the dedicated "Target Timeframes" integration makes perfect sense. I don't foresee any major issues migrating my setup when the time comes. Appreciate the clear communication and the 6-month notice period! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the proposed update information. I understand the logic behind this however in my instance it took me a very long time to get this working. I would class myself as a novice user, I am a pensioner so not a quick as some of the young guns. My worry is I would struggle with the new format. I will however investigate and see how I get on. Thanks for the work you do, much appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
It all makes sense however as an end user this will break a lot of automations for me. I would vote against it but as you are the one putting your free time to maintain this great integration it is your call. I am sure I can handle the change. Please keep in mind that there is a lot of copy/paste examples out there and more users using them. |
Beta Was this translation helpful? Give feedback.
-
|
Your proposal makes sense. It will break some of my working automations but six months is enough warning to manage a transition. Thanks for the work you have done. |
Beta Was this translation helpful? Give feedback.
-
|
You hinted at this new development about a month ago, so sort of expected. I've used targets since mid 2023 and they are central to my cost optimisation automations, initially with Agile and now IOG. Understand your logic and appreciate the heads-up. From my view maintaining two integrations is inefficient use of the time you give up to benefit others, so I am OK with the proposal. Something else to learn and updating many score automations is the small downside. I'll try to migrate one of my sensors to this and see how it goes. When do you think you will make a final decision on this? I'd prefer to wait until we know for sure prior to committing to the full transition. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the heads-up via the "Repair" notice for your Octopus Energy integration in HA and the detailed explanation. That all makes sense to me though as already noted is a bit inconvenient for current users. I wonder if there is a way to automate the migration from a user perspective? So by installing the Target Timeframes integration the user could choose to migrate the existing OE target rate sensors somehow? Maybe not possible due to the way HA does entity objects though. If not, then a step-by-step guide on "how to migrate target rate sensors from OE to Target Timeframes" would be great (and this could be linked from a future Repair notice). |
Beta Was this translation helpful? Give feedback.
-
|
Great suggestion, a step by step would certainly help.👍🤞 |
Beta Was this translation helpful? Give feedback.
-
|
bit of a lame techie here - what is the datasource we need to setup? Tried with the MPAN id but thinking it needs to be something else??? |
Beta Was this translation helpful? Give feedback.
-
|
Hi, think this is great. When I click on the blueprints, I get an error "Invalid parameters given." .. |
Beta Was this translation helpful? Give feedback.
-
|
I can see the logic in extracting this functionality in a separate integration. At the same time, I have a lot of automations driven by the binary sensor, including some bespoke dashboards, etc. I'm sure the migration is possible, but what would make this change a no-brainer for me is if there was automated migration of binary sensors from one automation to the other, if that is possible at all - i.e., for Target Timeframes automation to find all binary sensors from Octopus Energy one and migrate them such that even the name stays the same. I know that the binary sensors in Octopus Energy are in Octopus Energy namespace, but I'm wondering whether it is possible to keep them as aliases for the "new" migrated binary sensors. In other words, if there is a painless migration path - it all makes sense. If not - I'll be honest, I'm happy with the binary sensor feature in Octopus Energy to be "frozen" in its current state, as today it does all I want it to do. And those who need the cutting edge features could use your other automaton. |
Beta Was this translation helpful? Give feedback.
-
|
I think its a good idea, it will let you spend more of your time on useful things that you enjoy. |
Beta Was this translation helpful? Give feedback.
-
|
@BottlecapDave would you consider turning on discussions in the target time frame repo? |
Beta Was this translation helpful? Give feedback.
-
|
So I've installed the Target Timeframes integration via HACS, but not the OE Blueprint, and still have my single existing target rate sensor as part of my Octopus Energy integration installed and working. I added an entry, Name: Octopus Energy Target, Id: octopus_energy_target, and then added a Target Timeframe, completing the entries (Required Hours etc) the same as my existing Octopus Energy Target. So far, despite a couple of HA restarts, the resulting sensor only has Data Source Id as an attribute, and if I try to reconfigure it I get an error dialog "Config Flow could not be loaded. 500 Internal Server Error Server got itself in trouble" I haven't so far been prompted for any info about my OE account/MPAN etc so can't quite see how the Target Timeframes sensor I created will do it's magic. It's quite likely I've screwed up, but if I haven't, can I fix it, or do I simply wait for your migration guide to come out? Hold the cavalry! Great work, BTW |
Beta Was this translation helpful? Give feedback.
-
|
I think I understand the need of a blueprint as a "bridge" to export OE data as a compatible datasource (is that right?), but it still feels a little dissonant to me. Is it possible to either: a. Have OE create compatible datasources ? I'll try to run these in parallel for a while. |
Beta Was this translation helpful? Give feedback.
-
|
I have installed the new Integration and the Carbon Intensity and OE Blueprint, but I get this error. Message malformed: Missing input carbon_intensity_current_day_rates, carbon_intensity_next_day_rates, octopus_energy_free_electricity Those fields are blanks to fill in so I assume that is the error, but why are they blank? I have no free electricity option either. I am Cosy Octopus. I appreciate any help. |
Beta Was this translation helpful? Give feedback.
-
|
I understand the logic, my wallet is benefitting from your freely given time - I'm not going to argue! Thanks for the notice. I'll be sure to migrate when everything breaks in 6 months. 😂 |
Beta Was this translation helpful? Give feedback.
-
|
I get why you're doing this, but I think target rate sensors needs to be a software library that's pulled into the integration, maybe something like a python library, so end users get something that Just Works(TM). From an end user point of view, moving target rates into a separate integration just makes things more complicated for no apparent benefit - so is not an improvement. So I vote "no" to the proposal. (I've installed the target rate integration, but I can't make sense of how on earth I'm supposed to configure it. Trying to follow the instructions hasn't worked - there are too many differences between reality and the docs. Right now it's failing the not-too-difficult test; before unleashing it on users it needs to pass the higher bar of easy-to-use.) |
Beta Was this translation helpful? Give feedback.
-
|
Agree with this proposal, less duplication across integrations with something that can be made even better in its own integration. Nice work done here. |
Beta Was this translation helpful? Give feedback.
-
|
I like the target sensors in this integration, and s i already have them setup, I dont want to have to change them all. But can see your reasoning. Could the other integration be pulled into this as a library to save you having to maintain it in 2 places? |
Beta Was this translation helpful? Give feedback.
-
|
I follow the logic of doing this. From a 'clean HA' perspective I'd prefer to have less integrations, and of course I'd vote for not having to migrate my target rate sensors, but having firstly started on Octoblock within AppDaemon and then migrated to Target rate sensors, I'm sure I can migrate to the new solution. That you've written a migration guide makes it even easier. Do appreciate the advance notice and putting up the repair notice to prompt to come to this proposal discussion. |
Beta Was this translation helpful? Give feedback.
-
|
As with any change, it doesn't feel the greatest when you have to move to something new. However, I've just managed to migrate my dishwasher target rate sensor over to the Target Timeframes integration. The only thing that puzzled me for a moment was in the Blueprint (to fetch data from Octopus Energy), I had to enable the previous, current and next day rate sensors, as these were disabled by default for me. After a minute (takes 30 seconds for those sensors to pick up data), I was able to select the sensors within the Blueprint. As per the documentation, I had to reload the data source within the Target Timeframes integration, and I had to manually "run" the automation the blueprint had created so the target rate sensor had data. If you check the attributes, you can see it begins to pull in and use the data. That allowed me to verify it was indeed selecting the correct time. As a software engineer, I know what it's like when something begins to get too big. Splitting it out makes a lot of sense. People will adapt. Both are brilliant integrations, and I wouldn't have the automations I have now without it - so thank you. |
Beta Was this translation helpful? Give feedback.
-
|
Done without too many issues. And I do think breaking this out makes sense, not just for code upkeep but also for expansion to other companies and their sensors. Thanks BCD! |
Beta Was this translation helpful? Give feedback.
-
|
When I get some time I'll do this migration. However, at least for the moment, holidays are calling. An automated migration tool would be great, but that's just me being lazy. |
Beta Was this translation helpful? Give feedback.
-
|
If you only use target rate sensors then is this new integration to be used 'instead of' the current integration or 'in addition to' it ? |
Beta Was this translation helpful? Give feedback.
-
|
I know it's probablly better to split out for multiple suppliers support. Are there many suppliers that even offer the access API octopus do? I do really like that it's included as part of the octopus integration though, it's one less thing to have to add and it's such a neat solution with it pulling in information it needs automatically. You only need to add a couple of fields and you can make more items. I keep thinking of uses and adding more so personally i really like it integrated. |
Beta Was this translation helpful? Give feedback.
-
|
As a user of the octopus integration, I use the target rate sensors quite a lot and I'd find it pretty annoying to have to migrate for no additional benefit (for me - accept there's benefit to others). However, your justification makes sense and is well explained. You're also giving loads of warning. People can also just not upgrade. Ultimately you're doing this for free and giving it away, and so you can do what you like with it so long as you're not hurting anyone |
Beta Was this translation helpful? Give feedback.
-
|
I've recreated the target rate sensors , but I don't have the option to rename them - any advice ? |
Beta Was this translation helpful? Give feedback.
-
|
Just some feedback for Dave - I migrated across, a bit of a pain to do but it makes sense. A lot of work in these integrations (especially the much-appreciated documentation!) and the least we can do is adopt the new way to make maintenance a little simpler. I had to change value_inc_vat to just value in a couple of places, but apart from that it was seamless. The new more powerful integration using blueprints was a new concept for me, I can't say I understand yet but I did go poking around in the YAML - is it expected that this address path gives a 404? |
Beta Was this translation helpful? Give feedback.
-
|
Just finished migrating from Octopus to Target Timeframes. Slow process as I have a bunch of automations built on top of the target sensors, however I think I'm there now. A couple of gotchas in case anyone else is doing this:
I also decided to keep the new naming convention in the sensors rather than rename them to the old, this means that as I add new ones there is a naming convention that I can use to easily find these. And for anyone using the |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Target rate sensors are one of the key features of the Octopus Energy integration. It was so powerful, that a variation of it was included in another one of my integrations, Carbon Intensity, where carbon emissions was used instead of price.
However by having a variation of this available in two of my integrations, this posed issues with keeping them in sync with feature parity. There are also more energy providers popping up with OE like dynamic prices that can't take advantage of this feature. There are also other areas of automation that could benefit from this feature, for example picking a time when solar generation is at it's highest.
I therefore created a new integration, Target Timeframes, which takes this feature and abstracts the data source so it can be used with whatever data source a user can think of. This means this is one feature you don't have to worry about losing if you every move away from OE for whatever reason. I'm also thinking about doing the same with cost trackers
However, maintaining all of these variations of this feature and keeping feature parity takes a lot of work. Therefore I'm proposing the removal of target rate sensors from this integration in favour of using my other integration. I've already included a blueprint for using OE data. If I go ahead, this will be removed in 6 months time, around the end of november. A repair notice will be added in the next minor release to notify users of this change.
I've already removed the feature from my Carbon Intensity integration in favour of the new integration, as it had low known user count. However due to the high user count of this integration, I wanted to propose this removal instead of just doing it. I want to hear what scenario might be missing from the new integration.
EDIT:
An initial migration guide for this can be found at https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/migrations/target_timeframes/
Beta Was this translation helpful? Give feedback.
All reactions