erlendsellie/priceanalyzer

Trigger on price itself, not temperature

alekslyse opened this issue · 1 comments

Is it possible to use this to trigger on price itself and not temperature? From what I see in the FAQ it triggers on things like temperature (water heater), but what about electric car for example?

The main 'algorithm' behind this integration is to start heating up climate entitites before a big price increase, which does not translate directly to an electric car, or a water heater for that matter.
The attributes for the component has a lot of info.
image

I use the attribute current_hour a lot myself, which gives me attributes about the current hour, which i use for controlling my water heater. if current_hour.is_ten_cheapest == true, my water heater will have a set temp off 70 degrees(max), for instance, and 30 degrees if current_hour.is_five_most_expensive, to avoid using power in the most expensive hours, unless it's nearly empty.

You can use a template sensor in Home Assistant to get any of these attributes as a new sensor, or use them in other templates. If you want any more attributes in the component, i'll happily add them, if i'm able to code them :-)

So to answer your question, if you want the sensor to return the price itself, you should use a template sensor with {{states.sensor.priceanalyzer.current_hour.value}}. But then it will just become the same integration as the Nordpool-integration, which this integration is based upon; https://github.com/custom-components/nordpool