jpulakka / nordpool_diff

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

Could be non-polling #9

Closed jpulakka closed 1 year ago

jpulakka commented 2 years ago

Currntly we don't override should_poll property with False, and by default HA is polling us continuously. The good thing is that this works robustly, but maybe this isn't quite as beautiful as this could be. We should listen to nordpool state updates, and fire update only when needed, as described in https://developers.home-assistant.io/docs/core/entity/

jpulakka commented 1 year ago

Let's improve this by adding some caching instead, if needed. Current approach is simple and robust, don't fix what's not broken.