diff --git a/HA/custom_components/yoradio/manifest.json b/HA/custom_components/yoradio/manifest.json index 2bc4f04..8e65235 100644 --- a/HA/custom_components/yoradio/manifest.json +++ b/HA/custom_components/yoradio/manifest.json @@ -5,5 +5,5 @@ "dependencies": ["http", "mqtt"], "codeowners": ["@e2002"], "requirements": [], - "version": "0.9.407" + "version": "0.9.410" } diff --git a/HA/custom_components/yoradio/media_player.py b/HA/custom_components/yoradio/media_player.py index 4db27f4..27223e1 100644 --- a/HA/custom_components/yoradio/media_player.py +++ b/HA/custom_components/yoradio/media_player.py @@ -2,6 +2,7 @@ import logging import voluptuous as vol import json import urllib.request +import asyncio from homeassistant.components import mqtt, media_source from homeassistant.components.media_player.browse_media import async_process_play_media_url @@ -19,7 +20,7 @@ from homeassistant.components.media_player import ( RepeatMode, ) -VERSION = '0.9.407' +VERSION = '0.9.410' _LOGGER = logging.getLogger(__name__) @@ -130,6 +131,7 @@ class yoradioDevice(MediaPlayerEntity): self._max_volume = max_volume async def async_added_to_hass(self): + await asyncio.sleep(5) await mqtt.async_subscribe(self.api.hass, self.api.root_topic+'/status', self.status_listener, 0, "utf-8") await mqtt.async_subscribe(self.api.hass, self.api.root_topic+'/playlist', self.playlist_listener, 0, "utf-8") await mqtt.async_subscribe(self.api.hass, self.api.root_topic+'/volume', self.volume_listener, 0, "utf-8") diff --git a/README.md b/README.md index 449824f..7ca83c7 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,9 @@ Work is in progress... --- ## Version history +#### v0.9.337b (homeassistant component) +- fixed the error of subscribing to mqtt topic on some systems + #### v0.9.337b - added support for Arduino ESP32 v3.0.0 and later - disabled SD indexing on startup; now the card is indexed only if the `data/index.dat` file is missing from the card