Tvalley71 / dantherm

Dantherm Integration for Home Assistant
Apache License 2.0
10 stars 1 forks source link

Database usage high? #49

Open XilviuX opened 3 months ago

XilviuX commented 3 months ago

Not sure this is an actual issue, but I thought it was interesting to report.

I'm trying to lower the Home Assistant database use to decrease its size and maybe reduce the wear on the SD card. One of the first steps in many tutorials is to check the reports of the DbStats add-on which indicate the largest 'users' of the DB.

On one of the reports, Dantherm comes up as the main user - in my setup it takes the 1st, 3rd and 4th places...

Is this expected and normal? Any way to reduce this?

Capture d’écran 2024-07-24 à 09 01 40
Tvalley71 commented 3 months ago

Hi XilviuX, I will take a look at it, maybe some of the entities don't need to be recorded at all. The select one could be one of them.

Another way to reduce the storage is to raise the polling frequency.

Tvalley71

Tvalley71 commented 2 months ago

I have released a pre-release version that should update the database only when there is a change in an entity's value. Feel free to try it out and see if it affects storage usage.

Tvalley71

Tvalley71 commented 2 months ago

Hi XilviuX I think I have fixed operation_selection, the upper one in your chart, but I don't think I can do anything with all the other entities in regards to size, other than you can raise the poll frequency. You can delete your Dantherm instance and add it again, enter a higher poll frequency, say 30 seconds or even higher.

I will leave the update as a pre-release for the time being, if you will check it out when you get the time. Best regards Tvalley71

XilviuX commented 2 months ago

Thanks for the effort, I just re-setup my unit with the v4 pre-release. I set the refresh to 15 seconds, I'll see in a few days how it looks. Thanks again!