Skip to content

Commit

Permalink
Merge pull request #271 from hmmbob/patch-1
Browse files Browse the repository at this point in the history
Fixes for 2021.12.0
  • Loading branch information
fcusson authored Dec 12, 2021
2 parents ade2ea0 + fe2a773 commit 87a67c7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions custom_components/spotcast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def websocket_handle_castdevices(hass, connection, msg):
_LOGGER.debug("%s", known_devices)
resp = [
{
"uuid": cast_info.uuid,
"model_name": cast_info.model_name,
"friendly_name": cast_info.friendly_name,
"uuid": str(cast_info.cast_info.uuid),
"model_name": cast_info.cast_info.model_name,
"friendly_name": cast_info.cast_info.friendly_name,
}
for cast_info in known_devices
]
Expand Down
2 changes: 1 addition & 1 deletion custom_components/spotcast/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"requirements": [
"spotify_token==1.0.0"
],
"version": "v3.6.21",
"version": "v3.6.22",
"dependencies": [
"spotify"
],
Expand Down
15 changes: 7 additions & 8 deletions custom_components/spotcast/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def state(self):
return self._state

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes."""
return self._attributes

Expand All @@ -50,12 +50,11 @@ def update(self):

chromecasts = [
{
"host": "deprecated",
"port": "deprecated",
"uuid": cast_info.uuid,
"model_name": cast_info.model_name,
"name": cast_info.friendly_name,
"manufacturer": cast_info.manufacturer,
"uuid": str(cast_info.cast_info.uuid),
"model_name": cast_info.cast_info.model_name,
"name": cast_info.cast_info.friendly_name,
"manufacturer": cast_info.cast_info.manufacturer,
"cast_type": cast_info.cast_info.cast_type,
}
for cast_info in known_devices
]
Expand All @@ -82,7 +81,7 @@ def state(self):
return self._state

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes."""
return self._attributes

Expand Down
2 changes: 1 addition & 1 deletion custom_components/spotcast/spotcast_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def getChromecastDevice(self, device_name):
_LOGGER.debug("cast info: %s", cast_info)
if cast_info:
return pychromecast.get_chromecast_from_cast_info(
cast_info, ChromeCastZeroconf.get_zeroconf()
cast_info.cast_info, ChromeCastZeroconf.get_zeroconf()
)
_LOGGER.error(
"Could not find device %s from hass.data",
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Spotcast",
"domains": ["media_player", "sensor"],
"homeassistant": "2021.4.1",
"homeassistant": "2021.12.0",
"iot_class": ["Cloud Polling"]
}

0 comments on commit 87a67c7

Please sign in to comment.