Open kurtern84 opened 5 days ago
Hey there @danielhiversen, mind taking a look at this issue as it has been labeled with an integration (tibber
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tibber documentation tibber source (message by IssueLinks)
This works fine for me. What does the actual sensor show?
And also, what does the action action: tibber.get_prices
return?
On another note, this was a breaking change that caused some headaches that price_level is now LOW/NORMAL/HIGH instead of the more detailed VERY_CHEAP
> VERY_EXPENSIVE
.
Thanks for fast respons! Are the variable VERY_CHEAP > VERY_EXPENSIVE coming back, or is it now only LOW/NORMAL/HIGH? Just wondering because my automotation are responding to VERY_CHEAP > VERY_EXPENSIVE and so on.
action: tibber.get_prices return:
`prices: Åsvegen 12:
Probably not coming back, it was a change in pyTibber https://github.com/Danielhiversen/pyTibber/pull/317 that wasn't marked as breaking. But yes, it broke my automations too. You can add a custom sensors for it, something like:
template:
- sensor:
- name: Electricity Price Level
unique_id: electricity_price_level
state: >-
{%- set price = float(states('sensor.electricity_price_infinity_8'), default=-10000) -%}
{%- set avg_price = float(state_attr('sensor.electricity_price_infinity_8', 'avg_price'), default=0) -%}
{% if price > -10000 %}
{{- 'SUPER_CHEAP' if price <= avg_price*0.4 -}}
{{- 'VERY_CHEAP' if price <= avg_price*0.5 and price > avg_price*0.4 -}}
{{- 'CHEAP' if price > avg_price*0.5 and price <= avg_price*0.9 -}}
{{- 'NORMAL' if price > avg_price*0.9 and price < avg_price*1.15 -}}
{{- 'EXPENSIVE' if price >= avg_price*1.15 and price < avg_price*1.4 -}}
{{- 'VERY_EXPENSIVE' if price >= avg_price*1.4 }}
{%else%}
unknown
{%endif%}
Adjust interals as needed.
Below is the Tibber definitions:
VERY_CHEAP | The price is smaller or equal to 60 % compared to average price
CHEAP | The price is greater than 60 % and less or equal to 90 % compared to average price
NORMAL | The price is greater than 90 % and less than 115 % compared to average price
EXPENSIVE | The price is greater or equal to 115 % and less than 140 % compared to average price
VERY_EXPENSIVE | The price is greater or equal to 140 % compared to average price
Okey! Thanks for the help:)
I did not know Tibber has two different price levels :( I changed to a different query, because that returns data easier to work with.
So now I am unsure what to do. Changing it back will be another breaking change :/
For me, the solution above seems to work. Less work to change the automations. Also didn't know they had several price levels.
yeah something is broken. Tibber has this in their API
Price level based on trailing price average (3 days for hourly values and 30 days for daily values)
Value | Description -- | -- NORMAL | The price is greater than 90 % and less than 115 % compared to average price CHEAP | The price is greater than 60 % and less or equal to 90 % compared to average price VERY_CHEAP | The price is smaller or equal to 60 % compared to average price EXPENSIVE | The price is greater or equal to 115 % and less than 140 % compared to average price VERY_EXPENSIVE | The price is greater or equal to 140 % compared to average price
The problem
Price level in Tibber has started to show only HIGH regardless of price.
What version of Home Assistant Core has the issue?
core-2024.11.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Tibber
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tibber
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response