2019-01-14 22:54:40 INFO (MainThread) [homeassistant.helpers.script] Running script
2019-01-14 22:54:40 INFO (MainThread) [homeassistant.helpers.script] Executing step call service
2019-01-14 22:54:40 INFO (MainThread) [homeassistant.helpers.script] Script Pushbutton ADS NO: Running script
2019-01-14 22:54:40 INFO (MainThread) [homeassistant.helpers.script] Script Pushbutton ADS NO: Executing step call service
2019-01-14 22:54:40 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py”, line 287, in _handle_service_platform_call
await getattr(entity, func)(**data)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/template.py”, line 154, in async_turn_on
await self._on_script.async_run(context=self._context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 131, in async_run
await self._handle_action(action, variables, context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 210, in _handle_action
action, variables, context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 299, in _async_call_service
context=context
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py”, line 85, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1121, 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 241, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1143, in _execute_service
await handler.func(service_call)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/script.py”, line 123, in service_handler
context=service.context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/script.py”, line 181, in async_turn_on
kwargs.get(ATTR_VARIABLES), context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 131, in async_run
await self._handle_action(action, variables, context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 210, in _handle_action
action, variables, context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 299, in _async_call_service
context=context
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py”, line 85, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1121, 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 241, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1145, in _execute_service
await self._hass.async_add_executor_job(handler.func, 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/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/ads/init.py”, line 96, in handle_write_data_by_name
ads.write_by_name(ads_var, value, ads.ADS_TYPEMAP[ads_type])
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/ads/init.py”, line 153, in write_by_name
return self._client.write_by_name(name, value, plc_datatype)
File “/srv/homeassistant/lib/python3.5/site-packages/pyads/ads.py”, line 533, in write_by_name
value, plc_datatype)
File “/srv/homeassistant/lib/python3.5/site-packages/pyads/pyads_ex.py”, line 502, in adsSyncWriteByNameEx
port, address, ADSIGRP_SYM_VALBYHND, handle, value, data_type
File “/srv/homeassistant/lib/python3.5/site-packages/pyads/pyads_ex.py”, line 301, in adsSyncWriteReqEx
data = plc_data_type(value)
TypeError: an integer is required (got type str)
Seems it’s complaining about the data type, that int is expected, and string received. But the script sends an integer as value?