Replies: 7 comments
-
Chapter "4.3 Query Interval" of the Sunny Webbox RPC User Manual specifies that the interval should not be less than 30s ... and more has probably limited value => support for a configurable scan_interval was never enabled. If you really want to change this, you can modify this line with # TODO: Move scan_interval to options ? pylint: disable=fixme
interval = timedelta(
seconds=entry.data.get(CONF_SCAN_INTERVAL, entry.data[CONF_SCAN_INTERVAL])
) I should probably remove that from the configuration.yaml example and config flow to avoid confusion. |
Beta Was this translation helpful? Give feedback.
-
Were you able modify the file and get desired behavior ? Also, how do you monitor scan rate ? |
Beta Was this translation helpful? Give feedback.
-
I tried it, but it did nothing. |
Beta Was this translation helpful? Give feedback.
-
Did you restarted HA after the modification ? Just to make before I look into this. How do you monitor scan rate ? |
Beta Was this translation helpful? Give feedback.
-
Yes i did, I monitor scan rate by looking at how long it takes the sensor to update and it is still 30 s. |
Beta Was this translation helpful? Give feedback.
-
I'll have a look tomorrow (the update time is related to the latest data change not the latest data fetch I believe -> it could be that it is reading faster but that the value is only updated every 30s within the box). To make sure, you can enable debug log for this integration in your configuration.yaml and watch fetching time in HA logs (parameters -> system -> logs, load full logs): logger:
logs:
custom_components.sma_webbox: debug ex. for mine (with a 30s scan interval)
With debug level enabled, you should also see in these logs a message mentionning the scan_interval that has been loaded. |
Beta Was this translation helpful? Give feedback.
-
Just gave it a try using both configuration.yaml and configflow for integration setup and in both cases, scheduling of requests is taking place at the configured interval using the unmodified code (you can undo the above change, original code was OK already) -> could you supply your logs ? (add a "default: warning" to the logger to limit debug verbosity to this integration as illustrated below) logger:
default: warning
logs:
custom_components.sma_webbox: debug |
Beta Was this translation helpful? Give feedback.
-
I tried lowering the time and increasing it, yet it stills scans only every 30 seconds
Beta Was this translation helpful? Give feedback.
All reactions