Dimmer value in rule seems to be divided by 10

The previousState method will work with another persistence.
It’s up to you, but setting a “proper” persistence service like influxdb or mysql is worth the effort. It’s very low maintenance once set-up and very useful for graphs, queries…
And you will keep your rules triggers simple.

See:

for setting up influxdb. You don’t have to set-up grafana if you don’t want to.

I recommend it

Keep mapdb to do the restoreAtStartUp for all items with an everyChange strategy
Use influxdb as the default database with and ‘everyChange’ strategy at least

Good luck