This is a workaround for AppDaemon/appdaemon#1837
- Add the
call_service_with_responsescript to your HA config - Inherit your app from
ServiceResponseAppand usecall_serviceas usual withreturn_result
class MyApp(ServiceResponseApp):
async def initialize(self):
list = await self.call_service(
"todo.get_items",
entity_id="todo.shopping_list",
return_result=True,
)
self.log("list %s", list)
NOTE: since appdaemon 4.5.0 the workaround is no longer needed, check the doc for how to get the returned data.
If you want to quickly upgrade while keeping compatibility with your existing apps that inherit from
ServiceResponseAppabove, change the class with the one below: