Comments (32)
I've got a rough version working with some other bits in, need a bit of time to tidy it up but essentially you need to bring in the other 2 sensors with the past and future rates in and combine them into 1 array.
from octopus-energy-rates-card.
I've just submitted a pull request (#34) for some quick and dirty changes to support v9.0.0 of the HomeAssistant-OctopusEnergy integration.
Essentially it uses event.octopus_energy_electricity_{{METER_SERIAL_NUMBER}}{{MPAN_NUMBER}}_current_day_rates rather than the previous entity type.
It only supports one event entity, so if you want to see tomorrow's rates just use a second card with the event.octopus_energy_electricity_{{METER_SERIAL_NUMBER}}{{MPAN_NUMBER}}_next_day_rates.
Since v9.0 now works in £ not pence I have changed default medium and high limits to 0.2 and 0.3 and rounding to 3 decimal places to show 1/10p.
It's my first attempt to push code via GitHub, so please be gentle ;-)
from octopus-energy-rates-card.
There's a lot to fix in this, I took the opportunity to add some additional colours and rate bands...
I still hate the way the browser refuses to give up using the cached version of javascript cards like this one, always seem to spend most of my time trying to get changes to appear :)
as well as the "start" all "all_rates" changes, the card expects to be dealing in pence whereas the value is now in decimal pounds so needs to be multiplied by 100... this threw me on some of the graphs too where I was previously dividing by 100 to get GBP
If your referencing your own version of the Javascript module you can add a version reference to the url, then you just increment it each time you update your Javascript, i.e. in the URL section do this:
/local/octopus-energy-rates-card.js?v=6
Now if you refresh the page it should force it to reload the new version
from octopus-energy-rates-card.
completely unrelated but liking the Gas Tracker bit :)
from octopus-energy-rates-card.
I've submit a pull request with changes that make this work as before with the 3 new v9 "events" and add optional combine rates/show cheapest/use multiplier functions for display in pence/pounds. To make it work as before you just need to specific the 3 events to get the rates from.
from octopus-energy-rates-card.
Great work! I've switched to your repo for now.
How have you done that? I copied his forked code, but I can't find where the frontend custom elements are in HA?
I removed the existing version using HACS, added his GitHub repo as a custom repo, installed and updated the card config to include the three new entities as per the readme. When the original version gets fixed I'll just do the reverse, remove @igloo32 repo and switch back.
from octopus-energy-rates-card.
Thanks so much for the PRs here - I'll try and get this reviewed merged and released asap for all. Thanks again!
from octopus-energy-rates-card.
Thanks for the head up! Do you have a new example data structure somewhere that I can check to see if I can make it work? (is that already live?)
from octopus-energy-rates-card.
Wow I totally missed the link in that message originally. pre-coffee. Will look in to it.
from octopus-energy-rates-card.
I haven't had time to look in to this so if you wish to keep using the card do not yet upgrade to 9.0 of the integration
from octopus-energy-rates-card.
"if you wish to keep using the card do not yet upgrade to 9.0 of the integration"
Oops.... :-/
from octopus-energy-rates-card.
"if you wish to keep using the card do not yet upgrade to 9.0 of the integration"
Oops.... :-/
Ha, same! =(
Something else my wife used and now doesn't work! This is life on the cutting edge.
Thanks for all your work guys. Look forward to a fix
from octopus-energy-rates-card.
There's a lot to fix in this, I took the opportunity to add some additional colours and rate bands...
I still hate the way the browser refuses to give up using the cached version of javascript cards like this one, always seem to spend most of my time trying to get changes to appear :)
as well as the "start" all "all_rates" changes, the card expects to be dealing in pence whereas the value is now in decimal pounds so needs to be multiplied by 100... this threw me on some of the graphs too where I was previously dividing by 100 to get GBP
from octopus-energy-rates-card.
If your referencing your own version of the Javascript module you can add a version reference to the url, then you just increment it each time you update your Javascript, i.e. in the URL section do this:
/local/octopus-energy-rates-card.js?v=6
Now if you refresh the page it should force it to reload the new version
Oh, that's great, thanks for the tip I will give that a try
from octopus-energy-rates-card.
"if you wish to keep using the card do not yet upgrade to 9.0 of the integration"
Oops.... :-/Ha, same! =( Something else my wife used and now doesn't work! This is life on the cutting edge. Thanks for all your work guys. Look forward to a fix
Same here. Also looking forward to a fix. This will currently sit as a blank card on my dashboard. Has anyone else noticed that the new event entity also doesn't work in apexcharts?
from octopus-energy-rates-card.
Looks like the card will need reorganising too, because the rates are now split by day. I thought it would just a case of renaming the array and start attribute and scaling to pence, but currently needs multiple cards...
from octopus-energy-rates-card.
@igloo32 you need to fork the repo so you have read/write permissions. You then make the changes on your forked version of the repo. You then make a pull request from your repo (with your changes) to go into their repo
from octopus-energy-rates-card.
@igloo32 you need to fork the repo so you have read/write permissions. You then make the changes on your forked version of the repo. You then make a pull request from your repo (with your changes) to go into their repo
Cheers - I switched to VS Code and it actually gave me a useful error message and solution.
from octopus-energy-rates-card.
@igloo32 you need to fork the repo so you have read/write permissions. You then make the changes on your forked version of the repo. You then make a pull request from your repo (with your changes) to go into their repo
Cheers - I switched to VS Code and it actually gave me a useful error message and solution.
Great work! I've switched to your repo for now.
from octopus-energy-rates-card.
Great work! I've switched to your repo for now.
How have you done that? I copied his forked code, but I can't find where the frontend custom elements are in HA?
from octopus-energy-rates-card.
Great work! I've switched to your repo for now.
How have you done that? I copied his forked code, but I can't find where the frontend custom elements are in HA?
I removed the existing version using HACS, added his GitHub repo as a custom repo, installed and updated the card config to include the three new entities as per the readme. When the original version gets fixed I'll just do the reverse, remove @igloo32 repo and switch back.
I do not seem to have those 3 entities.... what am i missing? I use the bottlecapdave octopus int
from octopus-energy-rates-card.
Great work! I've switched to your repo for now.
How have you done that? I copied his forked code, but I can't find where the frontend custom elements are in HA?
I removed the existing version using HACS, added his GitHub repo as a custom repo, installed and updated the card config to include the three new entities as per the readme. When the original version gets fixed I'll just do the reverse, remove @igloo32 repo and switch back.
I do not seem to have those 3 entities.... what am i missing? I use the bottlecapdave octopus int
You need to enable them as they're disabled by default in the integration settings
from octopus-energy-rates-card.
Great work! I've switched to your repo for now.
How have you done that? I copied his forked code, but I can't find where the frontend custom elements are in HA?
I removed the existing version using HACS, added his GitHub repo as a custom repo, installed and updated the card config to include the three new entities as per the readme. When the original version gets fixed I'll just do the reverse, remove @igloo32 repo and switch back.
I do not seem to have those 3 entities.... what am i missing? I use the bottlecapdave octopus int
You need to enable them as they're disabled by default in the integration settings
Perfect, just found that as you replied! Does it take a while to update? For me all 3 events return 'Unkonwn'
from octopus-energy-rates-card.
Great work! I've switched to your repo for now.
How have you done that? I copied his forked code, but I can't find where the frontend custom elements are in HA?
I removed the existing version using HACS, added his GitHub repo as a custom repo, installed and updated the card config to include the three new entities as per the readme. When the original version gets fixed I'll just do the reverse, remove @igloo32 repo and switch back.
I do not seem to have those 3 entities.... what am i missing? I use the bottlecapdave octopus int
You need to enable them as they're disabled by default in the integration settings
Perfect, just found that as you replied! Does it take a while to update? For me all 3 events return 'Unkonwn'
They refresh every 30 minutes.
from octopus-energy-rates-card.
Thanks again everyone - v0.3.0 has been released now.
It's unfortunate those entities are disabled by default - I've mentioned that in the release notes. I think a clarification to the README will be neccessary also.
I'm still waiting for mine to start working, reloading the integration isn't enough to trigger the "event" to make the rates load it seems.
from octopus-energy-rates-card.
My card only goes to 10.30 tonight... is that expected behaviour?
from octopus-energy-rates-card.
Yes, for now anyway - tomorrow's rates aren't out yet.
(Mine is now working as expected after the event fired)
from octopus-energy-rates-card.
Yes, for now anyway - tomorrow's rates aren't out yet.
(Mine is now working as expected after the event fired)
Perfect, thanks. Everything back to normal then. Thanks to all for getting this back going. It was my most used part of HA =)
from octopus-energy-rates-card.
As above, versus 0.3.0 is now out which resolves this.
from octopus-energy-rates-card.
As of 9.0.1 the entities should be enabled by default, but I'm not sure if this will apply to people who installed the integration before this release.
from octopus-energy-rates-card.
I upgraded from 8.whatever straight to 9.0.1 and they were disabled.
I updated the README already to explain how to enable them for now...
from octopus-energy-rates-card.
Thanks to everyone who contributed to making this work again. Much appreciated!
from octopus-energy-rates-card.
Related Issues (20)
- Can't read target rates (black on blue) HOT 2
- not working even with current on bottlecapdaves v9.1 and v0.4.1 HOT 5
- different 9.1.0/0.4.1 error. undefined ratesCurrent HOT 1
- Not showing next day pricing HOT 3
- Feature request: Make current timeslot font bold HOT 4
- Feature request: Allow the threshold for Blue to be configurable
- More than one targetTimesEntity HOT 1
- I'm not getting it, is it me! - It was me HOT 3
- Feature request - multiple target sets
- Feature Request: Make more lightweight as causing wall panel tablet to lag HOT 4
- LimitMedMult is not defined HOT 2
- Documentation : Link to Target Rate Sensor documentation gives 404
- Cannot convert undefined or null to object HOT 4
- Advanced Configuration Options help HOT 3
- targetTimesEntities works with Chrome but not Edge HOT 4
- Hasn't worked for a long time - cannot read properties of undefined
- Use sensor value for limits HOT 1
- Time should be tied to Home assistant time zone HOT 1
- Clickable
- NaNp Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octopus-energy-rates-card.