Fix KeyError: 'volume' & KeyError: 'muted' for alga volume get#73
Fix KeyError: 'volume' & KeyError: 'muted' for alga volume get#73MrJarnould wants to merge 1 commit intoTenzer:mainfrom
KeyError: 'volume' & KeyError: 'muted' for alga volume get#73Conversation
|
Thank you for submitting this. I'll have to test it with my TV, as it's possible different versions of webOS have different response payloads. The existing code at least works for my TV. In case the changes here doesn't match the response payloads on my TV, I'll probably have to check both. |
|
I tested it on my TV now, and I can see the response payload from it is: {"returnValue": true, "scenario": "mastervolume_tv_speaker", "volume": 15, "muted": false}which isn't compatible with your proposed changes. I'll try to get it to support both formats, possibly tonight. Are you able to check as many other of the Also, if you don't mind, could you tell me what model of TV you have, so I have some idea of if this is a newer or older response format compared to what I have tested against. |
The response use a slightly different format for newer webOS versions than what I have available, so I haven't been aware of this difference until it was reported in #73.
|
Would you be able to test out the changes in #75 to check it works for you as well? It should support both the old and new response formats. |
|
I have merged the other PR, it will be out in a release a bit later today. |
Running
alga volume getresults in these errors:Updating the print statement to
response['volumeStatus']['volume']andresponse['volumeStatus']['muteStatus']fixes it.