evcc
evcc copied to clipboard
Add persistent settings
This PR adds a simple interface for storing/retrieving settings from database. Settings provide additional abstractor over the plain db.Instance.
Settings are only saved when settings.Persist() is called. A corresponding shutdown hook is registered during setup.
store.Provider and store.Store provide abstraction for creating a store for a single value and load/save against that store. Using these, individual devices do not need to depend on the settings implementation. See https://github.com/evcc-io/evcc/pull/4838 for example usage.