I get the following error when I run media_player.turn_off and the device is not off⌠When it is on, it works great. Why would you do that you say. Basically it is part of my âall_offâ script that runs when my presence is away or night. It blindly locks the doors, turns everything off. etc.
2019-05-02 07:13:23 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1643823184]
Traceback (most recent call last):
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 194, in handle_service
required_features
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py", line 316, in entity_service_call
future.result() # pop exception if have
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/components/ps4/media_player.py", line 355, in turn_off
self._ps4.standby()
File "/opt/homeassistant/lib/python3.5/site-packages/pyps4_homeassistant/ps4.py", line 159, in standby
self.open()
File "/opt/homeassistant/lib/python3.5/site-packages/pyps4_homeassistant/ps4.py", line 102, in open
raise NotReady
pyps4_homeassistant.errors.NotReady