Open bcjmk opened 1 year ago
Forgot to mention, this is an intermittent issue. Although it seems to be a pattern. Ran twice successfully, failed both once. Ran once successfully, failed next 2 times. Ran once successfully, failed next 3 times. I'll let it run a few more hours to see if the pattern continues.
After running overnight, it looks to be timeout related. When the requests finished in <5 seconds, no errors. 8-10 seconds was a single failure, and >11 seconds was 2 failures. Which makes sense because the timeout is set to 5. Might need to add the timeout value to the session.post as referred to here for the try/except to catch the error and provide the value. https://stackoverflow.com/questions/54619868/http-requests-post-timeout
No information on why this ERROR is occurring, but further obscured by wrong detail in the logger. I'm wondering if the "lastBilledDate" is NULL when trying to strftime which is done outside of the try/except section.
async def __getDataFromBalance(self, account) -> dict: """get data from appliance usage""" _LOGGER.info("Getting appliance usage data")
async def __getDataFromApplianceUsage(self, account, lastBilledDate) -> dict: """get data from appliance usage""" _LOGGER.info("Getting appliance usage data")
Version of the custom_component
version 0.0.1
Configuration
Not affected by configuration
Debug log