thank you for quick fixing
Regardin the map - No I haven’t map configured. I can see map in the HA area so wasn’t expecting anything more must be done.
Anyway showing option to enable map while the map is unavailable due to configuration cam be misleading. Maybe some notification about the need of enabling the map could be helpful for generic user.
Likely found the bug.
After adding the integration I repeated setting options in order to set custom coordinates of area.
After accepting setting everything were working for several days. Yesterday I restarded HA but this time the integration failed to work.
Below sceenshot of coordinates set as well as log records
Logger: homeassistant.components.sensor
Source: custom_components/netatmo/pyatmo/auth.py:167
Integration: Sensor (documentation, issues)
First occurred: 12:59:49 AM (1 occurrences)
Last logged: 12:59:49 AM
Error while setting up netatmo platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/config/custom_components/netatmo/sensor.py", line 197, in async_setup_entry
await add_public_entities()
File "/config/custom_components/netatmo/sensor.py", line 172, in add_public_entities
area_name=area.area_name,
File "/config/custom_components/netatmo/data_handler.py", line 133, in register_data_class
DATA_CLASSES[data_class_name], data_class_entry, **kwargs
File "/config/custom_components/netatmo/data_handler.py", line 106, in async_fetch_data
partial(data_class, **kwargs), self._auth,
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/netatmo/pyatmo/public_data.py", line 66, in __init__
resp = self.auth.post_request(url=_GETPUBLIC_DATA, params=post_params)
File "/config/custom_components/netatmo/pyatmo/auth.py", line 167, in post_request
f"{resp.status_code} - "
pyatmo.exceptions.ApiError: 400 - Bad request - Invalid coordinates given (21) when accessing 'https://api.netatmo.com/api/getpublicdata'
Ahh. You are right. This is written in field descriptions indeed.
you know… designating a rectangle requires 2 points in random order It must be the reason I ignored this requirement.
Maybe it’s good idea to consider this fact at time of improving the UI.
BTW it’s impossible to select the message with mouse (to copy&paste)… Someone had to put a lot of effort to disallow basic operation which is selecting the text in browser
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 449, in _async_add_entity
await entity.async_added_to_hass()
File "/config/custom_components/netatmo/sensor.py", line 531, in async_added_to_hass
await super().async_added_to_hass()
File "/config/custom_components/netatmo/netatmo_entity_base.py", line 59, in async_added_to_hass
self.async_update_callback()
File "/config/custom_components/netatmo/sensor.py", line 579, in async_update_callback
if self._data is None:
File "/config/custom_components/netatmo/sensor.py", line 527, in _data
return self.data_handler.data[self._signal_name]
KeyError: 'PublicData-b4104c82-2780-4574-8398-b11c004f7d24'
What’s implemented now is the prevention of entering mixed up coordinates. It wont fix existing entries. I can’t get it to fail no matter how often I restart, create and delete stations. I had this once when I was in the middle of fixing this, so this might be the case of an existing entry with wrong coordinates that can’t be established. Shouldn’t be possible any more.
OK thanks for answer.
Pity there is no easy way how to resolve such issues (beacuse all entities are marked as orphans.
At the end I removed integration (in Configuration/Integrations section) and re-added it again.
BTW I’ve noticed that the sensor handling 1-hour sum of rain changed the name. Previously its name contained ‘1h’ (the same way as 24h sensor has). Right now it contain ‘hour’ word.
Turning the light switch on and off is reacting very quickly
When the light on the camera is turned on due to movement, the status of the light entity in HA is not changing to on. Is that data available in the API?
Is the brightness of the light part of the API? Because then the brightness_level could also be used in HA.