Closed MrOzzOnline closed 2 years ago
In previous releases the apexchart was based on the current hour pricing entity. In order to optimize DB usage only the average electricity price entity now has the attributes with todays prices.
Apexchart uses (with the above config) the state value as the displayed value. Since you're now using the average entity the value doesn't correspond with the latest entry per se but it's the average value of all prices during that day. I see no bug in the behaviour of this integration and apexcharts. You could check if apexchart has the ability to override the displayed value so that the now value is used instead.
This is not correct. I've made a new sensor to test and this still is an issue. I've pulled the value from the current price and added the attributes of the average price.
- platform: template
sensors:
testsnsr:
friendly_name: "test sensor"
value_template: "{{ states('sensor.current_electricity_market_price') | float }}"
attribute_templates:
prices_today: "{{ state_attr('sensor.average_electricity_price_today' , 'prices_today') }}"
prices_tomorrow: "{{ state_attr('sensor.average_electricity_price_today' , 'prices_tomorrow') }}"
Filed as a bug at the Apexcharts respository:
When you have multiple sensors on the one apexcharts graph series sames are added at the bottom toghether with the current value. Since moving the atrributes to the everage price today entitry the value shown is the last value of the series and not the value at the current time.
Using the code from the readme example and adding a second entity I get this:
The circled values ar those from the last bar.
I'm not 100% sure this is an ENTSO-E issue or an apexcharts one, but this integration has changed most recently, so I'm betting on this one.
Code: