HI,
Have a set of Hue motion sensors, that i can switch with below rest_switch. Seems to work fine.Switching works as expected.
- platform: rest
resource: !secret motion_sensor_5
method: put
name: "Corridor motion sensor switch"
body_on: '{"config": {"on": true}}'
body_off: '{"config": {"on": false}}'
is_on_template: '{{ value_json.config.on }}'
scan_interval: 1
In the logs however, there’s endless repetition of this:
ERROR (MainThread) [homeassistant.components.switch.rest] Error while fetch data.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/components/switch/rest.py", line 178, in get_device_state
text = yield from req.text()
File "/usr/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 829, in text
await self.read()
File "/usr/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 798, in read
self._content = await self.content.read()
File "/usr/lib/python3.6/site-packages/aiohttp/streams.py", line 312, in read
block = await self.readany()
File "/usr/lib/python3.6/site-packages/aiohttp/streams.py", line 328, in readany
await self._wait('readany')
File "/usr/lib/python3.6/site-packages/aiohttp/streams.py", line 250, in _wait
await waiter
File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
yield self # This tells Task to wait for completion.
concurrent.futures._base.CancelledError
Not sure if this really is from the Hue sensor switch, but since i don’t have any other Rest switches, is must be…
Anyone recognize this error, and know what to do ?
Thanks,.
Marius