diff --git a/README.md b/README.md index be872443..8110d60c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Community post: https://community.home-assistant.io/t/spotcast-custom-component- _Now with support for speaker groups, transferring playback to and between chromecast devices and using HA entity id instead of device_name_. ***Important*** -Release 2.6 has a dependency to zeroconf 0.24.3 to make HASS work until proper upstream fix exists. +Release 2.6.1 has a woraround for zeroconf 0.24.4 so it is no longer needed to use older version. ## Installation diff --git a/custom_components/spotcast/__init__.py b/custom_components/spotcast/__init__.py index 685d1003..db5814aa 100644 --- a/custom_components/spotcast/__init__.py +++ b/custom_components/spotcast/__init__.py @@ -10,7 +10,7 @@ import random import time -_VERSION = '2.6.0' +_VERSION = '2.6.1' DOMAIN = 'spotcast' _LOGGER = logging.getLogger(__name__) @@ -215,9 +215,14 @@ def getChromecastDevice(self, device_name): known_devices = self.hass.data.get(KNOWN_CHROMECAST_INFO_KEY, []) cast_info = next((x for x in known_devices if x.friendly_name == device_name), None) _LOGGER.debug('cast info: %s', cast_info) + host = str(cast_info.host) + + if host.startswith('record'): + host = cast_info.host.rpartition(',')[-1] + if cast_info: return pychromecast._get_chromecast_from_host(( - cast_info.host, cast_info.port, cast_info.uuid, + host, cast_info.port, cast_info.uuid, cast_info.model_name, cast_info.friendly_name )) _LOGGER.error('Could not find device %s from hass.data, falling back to pychromecast scan', device_name)