Error while setting up arest platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/arest/sensor.py", line 101, in setup_platform
if variable not in response["variables"]:
KeyError: 'variables'
now my json is:
{“variables”: {“temperature”: 24, “humidity”: 40}, “id”: “1”, “name”: “esp8266”, “hardware”: “esp8266”, “connected”: true}
the “variabel” error is gone,
but now my error is:
arest: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 718, in async_device_update
await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/arest/sensor.py", line 165, in update
self._attr_available = self.arest.available
AttributeError: 'ArestData' object has no attribute 'available'
but In the manual example there is not attribute “available’”
I changed my json output with ‘available’ added:
{“variables”: {“temperature”: 24, “available”: 1}, “id”: “1”, “name”: “esp8266”, “hardware”: “esp8266”, “connected”: true, “available”: true}