Skip to content

Commit

Permalink
Expose volume_control_type (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored Feb 10, 2021
1 parent f88b2ff commit 29a2309
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pychromecast/controllers/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
TYPE_LAUNCH = "LAUNCH"
TYPE_LAUNCH_ERROR = "LAUNCH_ERROR"

VOLUME_CONTROL_TYPE_ATTENUATION = "attenuation"
VOLUME_CONTROL_TYPE_FIXED = "fixed"
VOLUME_CONTROL_TYPE_MASTER = "master"

CastStatus = namedtuple(
"CastStatus",
[
Expand All @@ -41,6 +45,7 @@
"transport_id",
"status_text",
"icon_url",
"volume_control_type",
],
)

Expand Down Expand Up @@ -215,6 +220,7 @@ def _parse_status(data, cast_type):
app_data.get("transportId"),
app_data.get("statusText", ""),
app_data.get("iconUrl"),
volume_data.get("controlType", VOLUME_CONTROL_TYPE_ATTENUATION),
)
return status

Expand Down

0 comments on commit 29a2309

Please sign in to comment.