-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot call service that returns a response #2010
Comments
See related issue: AppDaemon/appdaemon#2010
We now have this working in the dev branch |
Is a release planned for the "near future" or should we use the dev branch in the meantime? Thank you for your work either way! |
It will be a few weeks yet but not a lot longer, use the dev branch if you really need it and are feeling brave! The changes in the current dev work well for returning results and the docs are all there but we are planning a rewrite of parts of it and in particular startup conditions are broken. |
@acockburn Any news on when the new version will be available? |
Sorry for the delay - I got busy in real life - I hope to have some time to finalize this over the Holidays. |
I just ran into this issue myself. It's odd that the documentation explicitly mentions the ability to do this, and yet it does not actually work. Here's the example shown in the documentation:
Both of these result in the same error:
@acockburn I'm really excited to see this update in action. Thank you! |
AppDaemon's capability to return a result from a service was added before HASS had it, but it was internal to AD. That's why it's mentioned in the docs. |
I tried the dev docker image, and it doesn't error out, but it also doesn't return anything, although its the first time I a have tried this, so I may not be using it correctly. `
` yields ` 2024-12-31 12:51:28.815579 INFO AppDaemon: Calling initialize() for vacuum_lounge_floor ` I have tried the action in the developer tools, and it is returning the item in the list. Edit: ` 2024-12-31 13:00:24.835039 INFO AppDaemon: Calling initialize() for vacuum_lounge_floor ` |
You need to specify an extra flag, it’s in the dev docs (on my phone so can’T tell you more!)
Message ID: ***@***.***>
|
Got it - Works fine now. Thanks. |
I think the documentation for the entity.call_service api needs to be updated to match (or refer to the appdaemon api . It all seems to work, but I think it was the reason I missed the new parameters yesterday. |
What happened?
Cannot call a service from AppDaemon when response data is wanted.
Service call fails when either method is used.
self.temp_forecast_entity = self.get_entity('weather.ksjc_daynight') response=self.temp_forecast_entity.call_service(service='get_forecasts', type='hourly', return_response=True)
or
response=self.call_service('weather/get_forecasts', entity_id = 'weather.forecast_home', type = 'hourly', return_response=True)
Full write up has been posted on the forum
https://community.home-assistant.io/t/cant-call-service-that-returns-response/730859/7
Version
0.16.4
Installation type
Home Assistant add-on
Relevant log output
Relevant code in the app or config file that caused the issue
Anything else?
I've tried two different service calls on different integrations
I've also confirmed in the HA developer pane, the services work and return data.
My suspicion is that the "return_response=True" portion of the service call is getting lost though the API.
The text was updated successfully, but these errors were encountered: