Git Product home page Git Product logo

ha_epex_spot_sensor's People

Contributors

mampfes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ha_epex_spot_sensor's Issues

Another Helper Entity for Start and End-times?

Hey there,

thanks for the addon. i really like the idea and i think it could actually save me a lot of hassle for what i want to do. Though i am not 100% sure if i am able to archive what i want to do with this addon or if i need to think about it differently anyway.

So here it is: i have a simple and dumb home but now with smartmeter and power delivery paid by the hour. i would like to physically display when the next period for the cheapest prices would be. (ESP, MQTT, a nice display. That thing will live on top of my washing machine :) ) i never really found a straight forward way to display the upcoming TIME for the cheapest price.
Your addon makes this possible but only has a binary sensor for internal automations, but i don't think i have any possibility to display the actual TIME when the binary sensor will be set to ON.
Is there a simple way to pull this data from your sensor, or could you maybe add another entity which always displays the next time and date for the cheapest prices?

thanks so much!

Feature Request: Support for two different tariffs (Feed-in tariff and purchase tariff)

Hi,
so far your sensor add-on really works great!

Feature request:
I think many people that use your integration will have a pv panel installation. For example I have a different feed-in tariff and purchase tariff and created two helpers for it:

  • sensor.my_gross_purchase_tariff = sensor.epex_spot_data_net_price (configured with an absolute surcharge of 1.2 ct /kWh and Tax 20%).
  • sensor.my_gross_feed_in_tariff = sensor.epex_spot_data_price / 10 * 1.2

(both in ct/kWh)

Now I tried to solve that with a helper that combines both tariffs, that changes if I currently have PV surplus electricity:
sensor.my_gross_combined_price =
{% if states('sensor.mySmartmeter_total_power_togrid') | float > 5 %}
{{ states('sensor.my_gross_feed_in_tariff') }}
{% else %}
{{ states('sensor.my_gross_purchase_tariff') }}
{% endif %}

So the value of the sensor.my_gross_combined_price helper switches from sensor.my_gross_purchase_tariff to sensor.my_gross_feed_in_tarif if I am currently feeding in more than 5 Watts into the grid.

This basically works but unfortunately I can not use my sensor.my_gross_combined_price as a Price Input Sensor for your ha_epex_spot_sensor. The reason is, I guess, that my combined price sensor only contains data about the present and no attributes for the future.

So I guess we need a different approach here. My proposal would be, that you add the following fields to the configuration of your EPEX Spot Binary Sensor:

grafik

Could you implement this?
Or is there a more elegant way to achieve my goal?
thank you very much!

Feature request: Flexible duration -> flexible start time?

Hi mampfes!

Thanks for #12 !

My use case:
PV charged my home battery to x %. I know, that I need ~y % per hour.
So, I can calculate duration. Let say 15h my battey can last.
Epex Spot sensor gets this 15h to calculate times to discharge the battery (at highest prices starting 15:00 and ending 10:00 next day)
Works as expected.
But, the calculation=duration changes with state of charge because the battery discharges at highest price as expected.
now we have 23:00, duration dropped to 8h. And your sensor calculates new times, but also for already passed times:
image
My expectation is: 8h should be counted from now (and not from 15:00) until 10:00
But now I go sleep, and the SoC will not drop so fast -> duration can increase again, but this will not realy help if the past high prices will be counted.

So, my feature request is: start time can set to "now" if flexible duration is used

EDIT: my heat pump discharged the battey, and now only 6h are "left", but the sensor will get 2h only (7:00 - 9:00):
image

Expectation would be from now on:
23:00-1:59 and 6:00-9:59
image
image

EDIT2: it is morning, 29th of Feb.... 28th doen't help me anymore... hm:
image

How to use EPEX SPOT SENSOR in an automation?

Hi Steffen,

I was able to install EPEX SPOT SENSOR successfully, and the sensor works fine.

But I struggle when using the sensor in a simple automation with a call service switch toggle on/off for a relay.
The relay turns on/off when the sensor 'Enabled' -attribute changes from 'false' to 'true', instead of following the sensor 'Data' -attributes start and end times.

I don't see what I'm doing wrong.
Would you please help me with this?

Below is the information about the sensor and the automations I made.

Thanks in advance for your help.

Kind regards,
Wim

image

image

image

Error while dispatching event for sensor.epex_spot_data_net_price

Logger: homeassistant.helpers.event
Source: helpers/event.py:296
First occurred: 13:54:32 (1 occurrences)
Last logged: 13:54:32

Error while dispatching event for sensor.epex_spot_data_net_price to <Job track state_changed event ['sensor.epex_spot_data_net_price'] HassJobType.Callback <function BinarySensor.init..async_price_sensor_state_listener at 0x7f79aaaca0>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 296, in _async_dispatch_entity_id_event
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 691, in async_run_hass_job
hassjob.target(*args)
File "/config/custom_components/epex_spot_sensor/binary_sensor.py", line 174, in async_price_sensor_state_listener
_on_price_sensor_state_update()
File "/config/custom_components/epex_spot_sensor/binary_sensor.py", line 167, in _on_price_sensor_state_update
self._update_state()
File "/config/custom_components/epex_spot_sensor/binary_sensor.py", line 241, in _update_state
self._update_state_for_contigous(earliest_start, latest_end, now)
File "/config/custom_components/epex_spot_sensor/binary_sensor.py", line 294, in _update_state_for_contigous
marketdata = get_marketdata_from_sensor_attrs(self._sensor_attributes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/epex_spot_sensor/util.py", line 51, in get_marketdata_from_sensor_attrs
return [Marketprice(e) for e in data]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/epex_spot_sensor/util.py", line 51, in
return [Marketprice(e) for e in data]
^^^^^^^^^^^^^^
File "/config/custom_components/epex_spot_sensor/util.py", line 21, in init
raise KeyError()
KeyError

Spot sensor Status Unknown

I find your addition to EPEX Spot usefull and looking forward to use it.
Issues with Latest End Time setting smaller than earliest start time.

Latest time to end the appliance. Set it to same value as earliest start time to cover 24h. If set to smaller value than earliest start time, it automatically refers to following day.

When doing so, the status becomes unknown.

ps: setting the same time for both only works when both set to 12:00:00 AM.

Can not add helper

Hello, I cannot add the helpers with the link.

Does anyone have the same problem ?

(This integration does not support configuration via the UI. If you followed this link from the Home Assistant website, make sure you are running the latest version of Home Assistant.)

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.