Giter Club home page Giter Club logo

hass-peaqnext's People

Contributors

elden1337 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hass-peaqnext's Issues

Error calc when late in hour

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

Remove current hour

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)

Possible to get a sensor with just the datetime

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.

Alternative to NORDPOOL

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

Perhaps not wrong, but…

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.

image

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?

Add servicecall to alter sensor behavior

          > 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:

  • Limit SoC - current SoC for Car 1, which gives me the kWh needed --> I then calculate number of hours needed.
  • Limit SoC - current SoC for Car 2, which gives me the kWh needed --> I then calculate number of hours needed.
  • Charge before boundary (06:30) from a time helper value in HA.

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)

Option to recalculate by end-time

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)

Midnight update issue

At midnight, prices arent properly recalculated, resulting in "tomorrow" still being valid and thus showing wrong prices

Make comparer round to two decimals

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.

Calc issue

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

State not correct?

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?

Error setting up entry Peaqnext-sensors for peaqnext

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

Feature request: Add "price_subtract" config option

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?

Period keeps changing

I don't understand why the best/cheapest period keeps changing every minute.
image

A minute later:
image

Am I doing something wrong?

Also, it does not seem to pick the cheapest period:
image

Hub is_initialized missing

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'

Excluded hours not honored

Added a new sensor with this configuration:
2023-07-31_17-01

Got this status:
image

Hours 3 and 4 should neither be starting or ending hours...

peaqnext version: v.0.1.2

Possibility to get suggestions based on current minute

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.