-
Notifications
You must be signed in to change notification settings - Fork 131
Quarter hour price update #491
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as described in my system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me too! Thanks for fast programming! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked these modification on 2 different systems and they seem to work without errors.
|
Works for me as well, great work - thanks! 🥇 |
|
Works 👍 |
|
Does this take into account situations, where the price does not change every 15 minutes? |
The only nordpool market NOT on 15-minute MTU in DayAhead is ireland, which is on 30 minutes. In that case, every other update will just return the same price, since the sensor updates every 15 minutes |
Fair enough. I was just fancying myself of an implementation that would work on any intervals if they are for some reason ever to be changed again in the future. I had also some time ago problems with the nordpool sensor updating more often than the actual price updates and made a request to make state changes more robust and predictable: #379 |
|
added the changes manually to my files and it works, it now updates the prices to reflect the 15 min interval on the sensor (sorry i know i should probably help out in a more proper way but have not learned how yet) still since I did some manual tests I thought it would not hurt to add the comment |
|
See comments in #496 |
|
@Hellowlol please merge this asap |
|
we need a 0.0.18 |
|
There are still symbols and comments referring to hourly prices that needs to be fixed. Here: Do a |
Symbols don't matter, what matters is the logic. it could be just comment lines, not actual code. |
Comments and symbols must match actual code for readable and maintainable code. Basic rule. |
What I'm saying is that did you just run grep and post the results or did you also check each file and the occurrence of it? |
I did some of the work in this PR: #497 I agree that the changes should be done, but i believe in "make it work, then make it pretty", so while it's important to make maintainable code, first and foremost it should work, and right now it's not, which is why i closed the PR in favour of this one. I'm not going to finish my PR with the Readme-files and changes to the apex-chart, etc, so someone else feel free to fork my repository and continue |
|
This log entry also shows up from time to time, not sure what it means. Maybe a side effect of above size warning.?
|
|
Theory on the missing afternoon price in the small/quick history view. |
|
Suggestion, remove the raw_* data attributes. EDIT: never mind. Do not do this, there are other integrations depending in those attributes. |
|
Hi,
For me, removing the raw attributes is a deal breaker. I use those for all
of my automations of when to use the planned electricity usage. I scan
through those and select when to heat my house, water, pool, charge the car
and so forth. I think those are the great thing about this integration?
…On Sun, 12 Oct 2025, 09:58 Anders Höglund, ***@***.***> wrote:
*AndersHoglund* left a comment (custom-components/nordpool#491)
<#491 (comment)>
Suggestion, remove the raw_* data attributes.
nordpool$ git diff master
diff --git a/custom_components/nordpool/sensor.py b/custom_components/nordpool/sensor.py
index 2db5a96..e933981 100644
--- a/custom_components/nordpool/sensor.py
+++ b/custom_components/nordpool/sensor.py
@@ -387,8 +387,6 @@ class NordpoolSensor(SensorEntity):
"today": self.today,
"tomorrow": self.tomorrow,
"tomorrow_valid": self.tomorrow_valid,
- "raw_today": self.raw_today,
- "raw_tomorrow": self.raw_tomorrow,
"current_price": self.current_price,
"additional_costs_current_hour": self.additional_costs,
"price_in_cents": self._use_cents,
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKPWGQTKSPENVZDMMUHIH33XIC3NAVCNFSM6AAAAACH6L5LD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJUGA2DSMZYHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I also chime in, to not remove them. They are very useful for automation and most importantly, rendering proper charts! |
|
I think the best solution is to create two sensors one for today and one for tomorrow that way it is possible to keep the raw |
When are you gonna merge this PR? People are waiting 😅 |
|
It cant be merged as is as this introductions other serious issues. |
what issues? maybe I missed something, but for me it's been problem free experience for the past week. |
|
Hello @Hellowlol @Teme-V Could this issue be solved by not storing the heavy list attributes in the database at all? That way the attributes would remain usable, and as far as I can tell we’d at least avoid exceeding the 16384-byte limit. I can’t think of a reason the lists need to be written to the database, so perhaps those could simply be omitted. This might be one possible solution. I have this kind of workaround at the moment and looks like it works. Under sensor.py |
|
Regarding the 16384Byte limit i just removed the endtimes in my code thus cutting bytewise size into almost half and now it all fits in "one" sensor "block", I'm a heavy addict of carcharger and diverse electric usage appliances and i've yet to find any Integrations that use the endtimes for anything. Could this perhaps solve something (I added a 23:45 endtime back into the code to "mark" the end of the day). Seems everyone has remained sane and not used the START and END time for blocks instead just extrapolating from when the next "expensive" time after it starts to mark the end of the previous one thus saving tons of redundant code ... |
|
I have actually started to use the end date. I use it for two purposes:
1. Determine the length of the slot, I built this so it automatically would
work then switching between 1h to 15min MTU. So I know how much charge I
will get and so forth.
2. Determine which points are next to each other after certain slots have
been filtered out.
…On Mon, 13 Oct 2025, 02:21 friskens, ***@***.***> wrote:
*friskens* left a comment (custom-components/nordpool#491)
<#491 (comment)>
Regarding the 16384Byte limit i just removed the endtimes in my code thus
cutting bytewise size into almost half and now it all fits in "one" sensor
"block", I'm a heavy addict of carcharger and diverse electric usage
appliances and i've yet to find any Integrations that use the endtimes for
anything. Could this perhaps solve something (I added a 23:45 endtime back
into the code to "mark" the end of the day). Seems everyone has remained
sane and not used the START and END time for blocks instead just
extrapolating from when the next "expensive" time after it starts to mark
the end of the previous one thus saving tons of redundant code ...
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKPWGTEVDQDC6PKB6UT4U33XLWBDAVCNFSM6AAAAACH6L5LD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJVGUYDQOJRGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Same here. If you have time, just try my solution if it's possible for you. |
I have been running this PR since it was pushed. I see the error in logs and from what I understand of the log message it states "Attributes will not be stored". And that is just what you are proposing to do, so your solution sounds nice and easy. Not sure what happens if those attributes aren't stored. For example upon restart I guess the data will be missing and it would need to fetch the data again? |
I have been using |
|
Makes sense to not record those large lists. But will that solve issues with other integrations or automations having too small sensor buffers? (or maybe this is a non-issue?) |
Removing features after the fact should always be done with serious consideration. This integration has existed long enough that many other integrations and functionalities undoubtedly rely on these attributes. In this case, removing attributes doesn’t seem justified simply because someone doesn’t need them. Any removal or change will inevitably break other functionality for many users, making the integration unusable from their perspective or forcing significant rework to restore functionality by other means. We cannot assume that what isn’t important to me isn’t important to someone else. There are multiple ways to solve the 16-kilobyte limit, so removing attributes is not justified in an established, widely used integration. I suggest considering solutions more "kindly". In my view, the best fix is simply to keep the list-type attributes out of the recorder. That way nobody loses the attributes they rely on. I also struggle to see why these lists should be stored or what value it adds... unless we’re talking about something like Holt-Winters style forecasting with seasonality for data analytics, and even then there are probably better places to do that than a Home Assistant and integration. :) |
|
I don't understand why issue with 16k bytes is brought to this PR, can @Hellowlol just merge this PR asap and then we can figure issue with 16k in another PR? I think this PR is more important than 16k issue which has no harm in it. |
|
LGTM! |




Update sensor price every quarter hour