faanskit / ha-checkwatt

Home Assistant CheckWatt Integration
https://github.com/faanskit/ha-checkwatt
MIT License
10 stars 3 forks source link

Lost network, or failed login leads to component crash #38

Closed faanskit closed 10 months ago

faanskit commented 10 months ago

Sample log from crash

2023-12-28 19:58:12.727 ERROR (MainThread) [pycheckwatt] An error occurred during the request. URL: https://services.cnet.se/checkwattapi/v2/user/LoginEiB?audience=eib, Headers: {'accept': 'application/json, text/plain, */*', 'accept-language': 'sv-SE,sv;q=0.9,en-SE;q=0.8,en;q=0.7,en-US;q=0.6', 'content-type': 'application/json', 'sec-ch-ua': '"Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'cross-site', 'wslog-os': '', 'wslog-platform': 'controlpanel', 'authorization': 'Basic bWFyY3VzLmthcmxzc29uQHVzYS5uZXQ6TGlsbGt1azEw'}. Error: Cannot connect to host services.cnet.se:443 ssl:default [Name or service not known]
2023-12-28 19:58:12.729 ERROR (MainThread) [custom_components.checkwatt] Authentication failed while fetching checkwatt data: 
  File "/workspaces/core/homeassistant/data_entry_flow.py", line 395, in _async_handle_step
    self._raise_if_step_does_not_exist(flow, step_id)
  File "/workspaces/core/homeassistant/data_entry_flow.py", line 443, in _raise_if_step_does_not_exist
    raise UnknownStep(
homeassistant.data_entry_flow.UnknownStep: Handler ConfigEntriesFlowManager doesn't support step reauth