You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this integration in home assistant. I would like for the automation to trigger based on the Power state change.
Manually calling the endpoint "com.webos.service.tvpower/power/getPowerState" works. I see a debug log in the event log whose payload tells me the power state.
Example.
2022-05-22 18:57:23 DEBUG (MainThread) [aiowebostv] recv(192.168.5.131): {"type":"response","id":51,"payload":{"returnValue":true,"state":"Screen Saver"}}
Home assistant call_service API does not provide a return value so I can't get this output anywhere in home assistant except the debug logs.
I see in the code that we are subscribed to the power state changes and I also do see a log in the debug logs when TV power state changes. Example Active -> Screen Saver
Is there a way to call the getPowerState endpoint and read the data coming back from the TV?
Regards,
Vaibhav
The text was updated successfully, but these errors were encountered:
Because I didn't get any response on this, I did it with Node-Red add-on in HA.
Its still not Publish-Subscribe model. I need to invoke the flow in Node-Red to get the latest PowerState of the TV. I have set up a automation in HA to do that so it works OK.
Use the config node from this to create a config for your LG TV. You need IP address of your TV. I recommend using static IP so your configuration is guaranteed to work.
Set up Node-Red with Home Assistant if you haven't already so you can use the output of the Node-Red flow inside Home Assistant.
The flow to test the API call to LG TV and see the output in the debug window in Node-Red. Copy this and paste in Node-Red import window.
Hello,
I am using this integration in home assistant. I would like for the automation to trigger based on the Power state change.
Manually calling the endpoint "com.webos.service.tvpower/power/getPowerState" works. I see a debug log in the event log whose payload tells me the power state.
Example.
2022-05-22 18:57:23 DEBUG (MainThread) [aiowebostv] recv(192.168.5.131): {"type":"response","id":51,"payload":{"returnValue":true,"state":"Screen Saver"}}
Home assistant call_service API does not provide a return value so I can't get this output anywhere in home assistant except the debug logs.
I see in the code that we are subscribed to the power state changes and I also do see a log in the debug logs when TV power state changes. Example Active -> Screen Saver
Is there a way to call the getPowerState endpoint and read the data coming back from the TV?
Regards,
Vaibhav
The text was updated successfully, but these errors were encountered: