Closed arthur1472 closed 1 year ago
While looking at the code I found the issue.
In the file "custom_components/volkswagencarnet/init.py", rule 116, it makes use of the entry.options.get for the "CONF_SCAN_INTERVAL".
However, as can be seen in the 2nd screenshot of the issue, it saves the "scan_interval" config variable in data. Not in the options.
In the file "/custom_components/volkswagencarnet/config_flow.py" it has the data_schema, rule 259, which includes the "CONF_SCAN_INTERVAL".
After adding the "scan_interval": 1 line to my options through the .storage/config_entries, it started working.
2023-05-12 15:10:47.654 DEBUG (MainThread) [custom_components.volkswagencarnet] Async update finished for VIN (volkswagencarnet). Next update in 0:01:00.
2023-05-12 15:11:47.400 DEBUG (MainThread) [custom_components.volkswagencarnet] Async update finished for VIN (volkswagencarnet). Next update in 0:01:00.
2023-05-12 15:12:47.451 DEBUG (MainThread) [custom_components.volkswagencarnet] Async update finished for VIN (volkswagencarnet). Next update in 0:01:00.
2023-05-12 15:13:47.412 DEBUG (MainThread) [custom_components.volkswagencarnet] Async update finished for VIN (volkswagencarnet). Next update in 0:01:00.
2023-05-12 15:14:47.435 DEBUG (MainThread) [custom_components.volkswagencarnet] Async update finished for VIN (volkswagencarnet). Next update in 0:01:00.
Something similar might be happening to region as well.
If I have some time left over I will make a PR to fix this mistake.
Has been fixed with release v4.4.62
Environment
Describe the bug
I've changed the "Sensors update interval (minutes)", in the code "CONF_SCAN_INTERVAL" or in the config "scan_interval", to 1 instead of 5. However the updates still appear to happen every 5 minutes.
Steps to Reproduce
Setup the integration. Click on it again and set the "Sensors update interval (minutes)" to 1.
Expected behaviour
The expected behaviour is that the HomeAssistant integration updates the sensor data every minute instead of every 5 minutes, which is the default.
Screenshots
Traceback/Error logs
None
Debug information - all JSON responses from logfile
Below is a clean log of HomeAssistant after I first restarted the supervisor and HomeAssistant afterwards.
Additional context
I've enabled the debug logging of HomeAssistant and enabled "Enable full debug logs from API". Restarted HomeAssistant multiple times to see if that helps / clears any cached values (if there are any), unfortunately that didn't help.