what is the missing arguments?
Log details (ERROR)
Logger: homeassistant.components.environment_canada.coordinator
Source: helpers/update_coordinator.py:354
integration: Environment Canada (documentation, issues)
First occurred: 6:18:50 PM (1 occurrences)
Last logged: 6:18:50 PM
Unexpected error fetching environment_canada radar data
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/resolver.py", line 104, in resolve
resp = await self._resolver.getaddrinfo(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiodns.error.DNSError: (1, 'DNS server returned answer with no data')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1301, in _create_direct_connection
hosts = await self._resolve_host(host, port, traces=traces)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 911, in _resolve_host
return await asyncio.shield(resolved_host_task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 948, in _resolve_host_with_throttle
addrs = await self._resolver.resolve(host, port, family=self._family)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/resolver.py", line 113, in resolve
raise OSError(msg) from exc
OSError: DNS server returned answer with no data
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/env_canada/ec_radar.py", line 194, in _get_basemap
base_bytes = await _get_resource(map_url, basemap_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/env_canada/ec_radar.py", line 109, in _get_resource
response = await session.get(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 657, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 564, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 975, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1307, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host maps.geogratis.gc.ca:443 ssl:default [None]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/environment_canada/coordinator.py", line 29, in _async_update_data
await self.ec_data.update()
File "/usr/local/lib/python3.12/site-packages/env_canada/ec_radar.py", line 337, in update
self.image = await self.get_loop()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/env_canada/ec_radar.py", line 359, in get_loop
await self._get_basemap()
File "/usr/local/lib/python3.12/site-packages/env_canada/ec_radar.py", line 198, in _get_basemap
logging.warning("Map from %s could not be retrieved: %s" % map_url, e)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
TypeError: not enough arguments for format string
template:
- trigger:
- platform: time_pattern
hours: /1
- platform: homeassistant
event: start
action:
- service: weather.get_forecasts
data:
type: hourly
target:
entity_id:
- weather.peterborough_forecast
- weather.home
response_variable: hourly
sensor:
- name: Today Rain
unique_id: today_rain
state: "{{ (hourly['weather.home'].forecast[0].precipitation | default('nan')) }}"
#state: "{{ forecast['weather.home'].forecast[0].precipitation }}"
availability: "{{ is_number(hourly['weather.home'].forecast[0].precipitation ) }}"
unit_of_measurement: mm
- name: Temperature forecast next hour
unique_id: temperature_forecast_next_hour
state: "{{ hourly(['weather.peterborough_forecast'].forecast[0].temperature | default('nan'))}}"
#state: "{{ forecast['weather.peterborough_forecast'].forecast[0].temperature }}"
availability: "{{ is_number(hourly['weather.peterborough_forecast'].forecast[0].temperature) }}"
unit_of_measurement: °C
and i have some dict errors with the state and avaliability… it doesnt like it i guess if it cant connect to interent it gives me error i guess??