I upgraded from 2024.5.5 to 2024.6.1 two days ago, and Iām noticing this very concerning issue.
Emphasis on Failed to serialize to JSON
.
2024-06-11 13:35:24.824 ERROR (SyncWorker_17) [homeassistant.helpers.json] Failed to serialize to JSON: /home/homeassistant/.homeassistant/.storage/core.config_entries. Bad data at $.data.entries[105].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[106].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[107].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[108].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[109].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[110].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[111].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[112].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[113].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>
2024-06-11 13:35:24.825 ERROR (MainThread) [homeassistant.helpers.storage] Error writing config for core.config_entries: Failed to serialize to JSON: /home/homeassistant/.homeassistant/.storage/core.config_entries. Bad data at $.data.entries[105].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[106].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[107].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[108].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[109].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[110].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[111].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[112].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>, $.data.entries[113].data.scan_interval=1 day, 0:00:00(<class 'datetime.timedelta'>
Iām struggling to find hard evidence for this, but I think itās related to the file integration migration to the UI. My reason is purely that I have 9 of these sensors and there are 9 errors per log entry ā every time.
Hereās one of my sensor configs:
- platform: file
file_path: /home/homeassistant/.homeassistant/downloads/latest_dam_levels.csv
name: Steenbras Lower Dam Level
unit_of_measurement: "%"
value_template: "{{ '%0.2f'| format(value.split(',')[7] | round(2)) }}"
scan_interval: 86400
I asked on this core issue what the default scan interval is, but I havenāt received an answer yet. Is it 1 second? The UI doesnāt provide a way to check the full configuration (cannot see the template or scan interval).
Has anybody else noticed at least the same error?
In case someone asks: I havenāt edited my .storage
files manually, no.
I will do things when I have time*:
- Inspect the file integration code.
- Enable debug logging.
*My time is extremely limited at the moment.