[140631873476304] string indices must be integers
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 141, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 642, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 681, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 679, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/template/switch.py", line 187, in async_turn_on
await self._on_script.async_run(context=self._context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1041, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 254, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 262, in _async_step
await getattr(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
await handler.job.target(service_call)
File "/config/custom_components/xiaomi_miio_raw/sensor.py", line 132, in async_service_handler
yield from getattr(device, method["method"])(**params)
File "/config/custom_components/xiaomi_miio_raw/sensor.py", line 338, in async_command
await self._try_command(
File "/config/custom_components/xiaomi_miio_raw/sensor.py", line 240, in _try_command
return result and (result[0] == "ok" or result[0]["code"] == 0)
TypeError: string indices must be integers