-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to get the predictions as a sensor like normal nordpool sensor in HA #15
Comments
Similar to #9 which was a study for this. |
I am not so good with code but I can try to implement this. In the manifest.json what parameters do you need to put in? |
I haven't done a HA sensor myself, so we would start from the same level of ignorance here. The first number is milliseconds since epoch, something that eCharts and ApexCharts can read correctly by default. The second number is cents per kWh with VAT. An interim PR of this might be a .yaml file that could be placed in HA custom components. Or however that sensor is created. I have no need to push this to HACS, other than as a curiosity. You're welcome to try to implement a sensor. This is a frequent request by many. I might pick it up as well, when there's time. No harm trying twice and combining the learnings. If it reveals a need for a better, HA-centric prediction.json, those are doable if given a spec.
|
Heya, I'm the author of https://github.com/masipila/openhab-spot-price-optimizer/ which is built on openHAB. openHAB is another home automation system like HomeAssistant. @vividfog Do I get things right that the architectural approach is that
EDIT:
Cheers, |
That looks like an interesting project too. I would like to have an API for this, if a free tier indie/hobby friendly option for hosting the runtime components exists and it works with Python. I don't mind running all the compute in the cloud if there's an option. The JSON files are basically a PoC to get the data available in some form to begin with. Not the endgame. I happen to use HA so it's getting some personal attention. My fridge door HA tablet was the first client app. Firebase has Cloud Functions but I haven't had time to investigate that option yet. Other pointers welcome. Others can run their own predictions if they wish, as long as their index.html makes it clear it's not me who hosts that page and they have their own disclaimers. Given that the model is changing a lot, an API would likely make most sense for most, rather than some distributed everyone-for-themselves setup. People have that option but I don't intend it as an obligation. |
I was also thinking if there would be a possibility to go beyond 5 days. For example Foreca gives 10days forecast. I would love to have an option where you can see the more accurate predicition of 5 days but also see a full 2 week predicition by the system also. I tried yesterday implement it to HA with the help of chatgpt, but couldnt get it to understand the prediciton.json and get the numbers in to a sensor |
The weather data is available for 10 days, so ten days is doable. To do it in a maintainable manner, this would require a solid few hours to sit back and refactor the code to make this a variable to ensure the data frames passed back and forth during prediction remain clean and robust. The current implementation is a bit of "learn as I go", so I'd like to (at some point) refactor it in this regard. And if there's an API, then surely it should pass information up to however far the prediction runs, even if the standard web page is more conservative and sticks to +5 days. If you don't mind, pass this as a new issue/enhancement, as it's a bit unrelated to this one. As is the API topic itself BTW. |
I took this up as a case to start with Python and Home Assistant coding. It then creates sensor that contains prediction data as attribute. @vividfog Thanks for data. |
Is there anyway to get these predictions into a sensor in HA like the normal nordpool sensor. Would be best to update it when new prices are coming and showing the confirmed prices + predictions. Looking to integrate the predictions to emhass in HA
The text was updated successfully, but these errors were encountered: