🏡 Open source home automation that puts local control and privacy first.
Find a file
J. Nick Koston 3212a43e6b
Fix handling of dns resolution failure during sense setup (#88279)
```
2023-02-16 20:44:54.516 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry alexander for sense
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 861, in _resolve_host
    await event.wait()
  File "/usr/local/lib/python3.10/site-packages/aiohttp/locks.py", line 34, in wait
    raise self._exc
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 874, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 860, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 381, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/sense/__init__.py", line 83, in async_setup_entry
    await gateway.get_monitor_data()
  File "/usr/local/lib/python3.10/site-packages/sense_energy/asyncsenseable.py", line 214, in get_monitor_data
    json = await self._api_call("app/monitors/%s/overview" % self.sense_monitor_id)
  File "/usr/local/lib/python3.10/site-packages/sense_energy/asyncsenseable.py", line 174, in _api_call
    async with self._client_session.get(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.sense.com:443 ssl:default [Try again]  ```
2023-02-16 23:18:16 -05:00
.devcontainer Revert "Add SSHd and GH CLI to devcontainer to support gh net" (#86360) 2023-01-21 21:18:22 -05:00
.github Add python 3.11 to the CI (#88038) 2023-02-16 12:38:32 -05:00
.vscode Remove translations from Core (#87543) 2023-02-06 15:06:43 +01:00
docs Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
homeassistant Fix handling of dns resolution failure during sense setup (#88279) 2023-02-16 23:18:16 -05:00
machine Update Builder & Wheels + support yellow (#73896) 2022-06-23 13:58:24 +02:00
pylint/plugins Inverse json import logic (#88099) 2023-02-16 11:37:57 +01:00
rootfs Fix logging & exit code reporting to S6 on HA shutdown (#72921) 2022-06-02 19:49:08 +02:00
script Add python 3.11 to the CI (#88038) 2023-02-16 12:38:32 -05:00
tests Cleanup stale recorder code (#88275) 2023-02-16 23:12:11 -05:00
.core_files.yaml Increase test scope of MariaDB + PostgreSQL tests (#87019) 2023-02-13 15:58:13 -06:00
.coveragerc Revert "Add a calendar entity to Ridwell (#86117)" (#88106) 2023-02-14 10:23:32 -07:00
.dockerignore Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
.gitattributes highlight Dockerfile.dev as Dockerfile in github ui (#36933) 2020-06-22 14:45:57 +02:00
.gitignore Remove translations from Core (#87543) 2023-02-06 15:06:43 +01:00
.hadolint.yaml Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
.pre-commit-config.yaml Update Ruff to v0.0.247 (#88210) 2023-02-15 16:46:03 -05:00
.prettierignore Add Leviton brand (#79244) 2022-09-29 12:28:51 +02:00
.readthedocs.yml Update readthedocs config (#65230) 2022-01-30 20:15:32 -08:00
.strict-typing Add strict typing to yalexs_ble (#88086) 2023-02-14 11:38:51 -05:00
.yamllint Add yamllint (in pre-commit and CI) (#33676) 2020-04-05 10:33:45 +02:00
build.yaml Bump docker base to 2023.02.0 (#88084) 2023-02-14 20:34:54 -05:00
CLA.md Update LICENSE.md and CLA.md to reflect the new Apache 2.0 license 2017-01-28 12:12:34 -08:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md (#73468) 2022-06-23 01:41:22 +02:00
codecov.yml Add recorder platform to required test category (#86704) 2023-01-26 11:03:56 +01:00
CODEOWNERS Change geniushub codeowner (#87918) 2023-02-13 12:11:38 +01:00
CONTRIBUTING.md Use core GitHub URL in contributing guidelines (#41083) 2020-10-02 20:42:33 +02:00
Dockerfile 75142 Added QEMU_CPU ARG to the dockerfile (#86178) 2023-01-19 10:22:23 +01:00
Dockerfile.dev Drop Python 3.9 support (#85456) 2023-01-22 20:40:33 +01:00
LICENSE.md Update license to official GitHub template (#16470) 2018-09-07 10:11:51 +02:00
MANIFEST.in Move remaining keys to setup.cfg (#65154) 2022-01-28 20:18:09 -08:00
mypy.ini Add strict typing to yalexs_ble (#88086) 2023-02-14 11:38:51 -05:00
pyproject.toml Update typing-extensions to 4.5.0 (#88236) 2023-02-16 11:21:54 +01:00
README.rst Update featured integrations image (#76011) 2022-08-02 09:09:24 +02:00
requirements.txt Update typing-extensions to 4.5.0 (#88236) 2023-02-16 11:21:54 +01:00
requirements_all.txt Implement Switchbot Blind Tilt (#86591) 2023-02-16 21:06:02 -06:00
requirements_docs.txt Refactor API documentation (#33217) 2020-03-25 13:21:04 -07:00
requirements_test.txt Update pydantic to 1.10.5 (#88250) 2023-02-16 14:01:59 +01:00
requirements_test_all.txt Implement Switchbot Blind Tilt (#86591) 2023-02-16 21:06:02 -06:00
requirements_test_pre_commit.txt Update Ruff to v0.0.247 (#88210) 2023-02-15 16:46:03 -05:00
setup.cfg Enable Ruff TRY004 (#86811) 2023-01-30 14:06:52 +01:00

Home Assistant |Chat Status|
=================================================================================

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
`tutorials <https://home-assistant.io/getting-started/automation/>`__ and `documentation <https://home-assistant.io/docs/>`__.

|screenshot-states|

Featured integrations
---------------------

|screenshot-integrations|

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://developers.home-assistant.io/docs/architecture_index/>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/creating_component_index/>`__.

If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.

.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
   :target: https://discord.gg/c5DvZ4e
.. |screenshot-states| image:: https://raw.githubusercontent.com/home-assistant/core/master/docs/screenshots.png
   :target: https://home-assistant.io/demo/
.. |screenshot-integrations| image:: https://raw.githubusercontent.com/home-assistant/core/dev/docs/screenshot-integrations.png
   :target: https://home-assistant.io/integrations/