jpulakka / nordpool_diff

Transforms electricity spot price into thermostat control signal. Home Assistant custom component.
MIT License
63 stars 7 forks source link

Adjustable unit, adjustable name #5

Closed jpulakka closed 2 years ago

jpulakka commented 2 years ago

Currently unit is hardcoded EUR/kWh/h. Ideally it should be derived from nordpool's unit, but how to? As pragmatic solution, let's just make it adjustable (but optional). It may be nice to set it to EUR/kWh to get it in same plot as nordpool prices. Even if EUR/kWh is not strictly correct, neither is EUR/kWh/h except when filter_length=2 is used.

Also name could well be adjustable. For default, current nordpool_diff_N is good.

BTW I think hass gets confused if unit of an enity changes. At least history plots use the old unit, how long? Need to change name to treat it as "new". This complects testing a bit.

jpulakka commented 2 years ago

Unit done in https://github.com/jpulakka/nordpool_diff/commit/3880ef3c60633044368b2719272e182ae27a47e0

Name can be adjusted in HA UI.