elden1337 / hass-peaqnext Goto Github PK
View Code? Open in Web Editor NEWUtility sensors to help find the next best usage of your appliances
License: Other
Utility sensors to help find the next best usage of your appliances
License: Other
Nope, Non hours dont show up in the attributes when I make a new sensor :(
Originally posted by @tux2000 in #8 (comment)
When it's late in an hour the prices are off. Test with very expensive now and very cheap +1 and note that they dont recalc properly
This is perhaps not wrong, but it's not what I expected…
I have an hourly sensor, set at 60 minutes and flat consumption.
It suggests the start time to 21:00, but 22, 23, 00, 01, 02, 03, 04 and 05 are all better/cheaper start times.
My expectations are that the sensor should choose the cheapest start time in the next 12 hours, recalculated every hour. And the first if there are several that are cheapest.
From the data in my current example (I have removed all times >12h) you can see that 23:00 should be the start time, or am I missing some other parameter that suggests that 21:00 is better than all other up until 6 o'clock?
Another thought. I can't set my dishwasher to a specific time. There is a button for +1 hour. But that means if I activate the machine at 18:45 it will start at 23:45 for example. So only 15 minutes in that cheap hour. It would be more accurate to create a model that calculates the prices based on minutes instead of hours. But this probably requires a rewrite of your entire model. What I would like to see for my dishwasher is a attribute that tells me the amount of hours I should delay the start (like +6).
Originally posted by @sjoukebakker in #5 (comment)
If set, the suggestion should not add a start or stop during these hours (must be selectable)
":I know the pattern of my appliance in watts. Maybe an option for a custom pattern would be possible. To make the calculation of the price more accurate."
Originally posted by @sjoukebakker in #5 (comment)
Maybe the current hour can also be removed from the list. Now it will display starting at 10:00 as the cheapest option, even when it is already 10:59.
Originally posted by @sjoukebakker in #5 (comment)
In Denmark, there's an option to get a refund of the tax paid per kWh to charge EV vehicles. This means that a peaqnext device used for EV charging should subtract a specific amount per kWh.
Would you consider adding an optional configuration option called something like "price_subtract" that defaults to "0" and is subtracted the Nordpool values?
At midnight, prices arent properly recalculated, resulting in "tomorrow" still being valid and thus showing wrong prices
currenctly hard-coded to 12h from "now".
Otherwise price is x10
I have setup a sensor but the results are totally wrong. Its set up to 12h but pulls 24h.
The Price is far away from reality. (I konw hard times, buts thats a bit too much ;) ) Also the foreseen cheapest time issnt the cheapest.
Any idea?
sensor.peaqnext_battload1h
PeaqNext battload1h
23:00-00:00⁺¹ € 0.35 All sequences:
23:00⁺¹-00:00⁺¹: € 0.33
23:00-00:00⁺¹: € 0.35
00:00⁺¹-01:00⁺¹: € 0.36
01:00⁺¹-02:00⁺¹: € 0.36
02:00⁺¹-03:00⁺¹: € 0.36
03:00⁺¹-04:00⁺¹: € 0.36
04:00⁺¹-05:00⁺¹: € 0.36
'>> 22:00-23:00': € 0.37
12:00⁺¹-13:00⁺¹: € 0.37
13:00⁺¹-14:00⁺¹: € 0.37
21:00⁺¹-22:00⁺¹: € 0.37
05:00⁺¹-06:00⁺¹: € 0.38
11:00⁺¹-12:00⁺¹: € 0.39
14:00⁺¹-15:00⁺¹: € 0.39
22:00⁺¹-23:00⁺¹: € 0.39
10:00⁺¹-11:00⁺¹: € 0.46
15:00⁺¹-16:00⁺¹: € 0.46
20:00⁺¹-21:00⁺¹: € 0.46
16:00⁺¹-17:00⁺¹: € 0.5
06:00⁺¹-07:00⁺¹: € 0.51
09:00⁺¹-10:00⁺¹: € 0.55
17:00⁺¹-18:00⁺¹: € 0.56
19:00⁺¹-20:00⁺¹: € 0.56
18:00⁺¹-19:00⁺¹: € 0.59
07:00⁺¹-08:00⁺¹: € 0.64
08:00⁺¹-09:00⁺¹: € 0.71
Consumption type: Flat consumption
Duration in minutes: 60
Consumption in kWh: 3.6
Closest cheap hour limit: 12.0h
raw_start: 2023-10-22T23:00:00.000000
price_source: Nordpool
update_by: Every hour
calculate_by: Start time
icon: mdi:clock-start
friendly_name: PeaqNext battload1h
This error originated from a custom integration.
Logger: homeassistant.helpers.entity
Source: custom_components/peaqnext/service/nordpool/nordpool.py:76
Integration: peaqnext, utility sensors (documentation, issues)
First occurred: 30 July 2023 at 20:46:49 (3 occurrences)
Last logged: 30 July 2023 at 20:46:49
Update for sensor.peaqnext_torktumlare fails
Update for sensor.peaqnext_tvattmaskin fails
Update for sensor.peaqnext_diskmaskin fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 695, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 940, in async_device_update
await self.async_update()
File "/config/custom_components/peaqnext/sensors/next_sensor.py", line 44, in async_update
status = await self.hub.async_get_updates(nametoid(self.given_name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/peaqnext/service/hub.py", line 45, in async_get_updates
await self.nordpool.async_update_nordpool()
File "/config/custom_components/peaqnext/service/nordpool/nordpool.py", line 76, in async_update_nordpool
elif self.hub.is_initialized:
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Hub' object has no attribute 'is_initialized'
Ie, if calculating start show "start 4h" instead of 04:00 (if now is 00:00).
If calculating end show "end 4h"
Hi thanks for the great work.
Is it possible to use another source than NORDPOOL?
I use https://github.com/MTrab/energidataservice (that is build ond the data from NORPOOL, adding local gridcosts) it would be great if instaed of the "raw" price from Nordpool, I would get the expected cost that would more closely match me electricity bill.
I thank you in advance.
Kind regard
Christian
Hi, this is a cool component - thanks for your work!
I have both a dishwasher and a washing machine that is controllable from Home Assistant so what I would like to do is set the timed start on my appliances to the time your great component suggests as the best time. The sensor now shows start time, end time and cost as a string (which is fine for display in Home Assistant frontend). But for automation purposes it would be great to have the suggested start time available as a seperate sensor in a "Home Assistant approved" datetime format. Having such a sensor would avoid having to parse and jinja template to get the time. Instead the sensor could be used directly.
For my dryer I can set an end time (in full hours from 'now'). For example: the drying program takes 1 hour and 10 minutes. I can set the end time to 4 hours from now. so the machine will start in 2 hours and 50 minutes.
Originally posted by @sjoukebakker in #25 (comment)
To see when it's best to run in sequence. Like wash>tumble for instance.
Installed the peaqnext integration.
Rebooted HA.
One sensor was added.
The sensor failed to setup with the folowing message in Log: "more than one Nordpool entity found. Cannot continue".
My Nordpool integration contains one device and one entity?
Any clues?
> U'r using this to charge? Interesting.
I'll have a look
Right now I'm using a template to calculate which hours are the best to charge. I get a start time, just like peaqnext. I use three inputs for the template:
The template adds hours car 1 + hours car 2 and finds the cheapest consecutive interval before the departure time.
Originally posted by @nord- in #4 (comment)
Denne fejl stammer fra en brugerdefineret integration.
Logger: homeassistant.config_entries
Source: custom_components/peaqnext/init.py:61
Integration: peaqnext, utility sensors (documentation, issues)
First occurred: 18. september 2023 kl. 22.51.51 (2 occurrences)
Last logged: 18. september 2023 kl. 22.51.51
Error setting up entry Peaqnext-sensors for peaqnext
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/peaqnext/init.py", line 28, in async_setup_entry
internal_sensors = await async_create_internal_sensors(conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/peaqnext/init.py", line 61, in async_create_internal_sensors
update_by=UpdateBy(s.get(CONF_UPDATE_BY)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 712, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 1128, in new
raise ve_exc
ValueError: None is not a valid UpdateBy
These quotes are from #5
Rounding to one decimal makes the data quite useless in my case because that allows a difference of 0.09 EUR (1.05 SEK) . My hourly prices are also in that range today (cheapest hour is 0.285 and most expensive 0.377). So in my case it basically sorts by hour right now.
I think the comparer perhaps could be improved by adding one decimal if using cent. Lets look in another issue
We also have the Closest cheap hour limit
option to limit the amount of time from now to the next cheapest option. So maybe it would be fine to just sort by two decimals all the time. However I understand that that is very little money in SEK. 😅
It could also be some kind of calculation based on the available prices. A percentage of the difference between the highest and lowest value.
Good afternoon,
Thanks for this integration! :) In my home assistant installation the state of the sensor is the current price. While the readme states that the sensor state should be the cheapest option in the next 12 hours.
Any idea what I'm doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.