Skip to content

Commit

Permalink
Fix wrong running app caused by incomplete ws message
Browse files Browse the repository at this point in the history
  • Loading branch information
ollo69 committed Jan 31, 2023
1 parent 43722ef commit eb12200
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions custom_components/samsungtv_smart/api/samsungws.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,10 @@ def _set_running_app(self, response):
return
if (result := response.get("result")) is None:
return
if isinstance(result, bool):
is_running = result
elif (is_running := result.get("visible")) is None:
if not isinstance(result, dict):
self._running_app = None
return
if (is_running := result.get("visible")) is None:
return

self._last_running_scan = datetime.utcnow()
Expand Down
2 changes: 1 addition & 1 deletion custom_components/samsungtv_smart/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"codeowners": ["@jaruba", "@ollo69", "@screwdgeh"],
"config_flow": true,
"iot_class": "cloud_polling",
"version": "0.11.3"
"version": "0.11.4b1"
}

0 comments on commit eb12200

Please sign in to comment.