v0.9.337b (homeassistant component)

This commit is contained in:
e2002
2024-11-27 14:15:06 +03:00
parent 4f1582b7d6
commit cac9364d79
3 changed files with 7 additions and 2 deletions

View File

@@ -5,5 +5,5 @@
"dependencies": ["http", "mqtt"], "dependencies": ["http", "mqtt"],
"codeowners": ["@e2002"], "codeowners": ["@e2002"],
"requirements": [], "requirements": [],
"version": "0.9.407" "version": "0.9.410"
} }

View File

@@ -2,6 +2,7 @@ import logging
import voluptuous as vol import voluptuous as vol
import json import json
import urllib.request import urllib.request
import asyncio
from homeassistant.components import mqtt, media_source from homeassistant.components import mqtt, media_source
from homeassistant.components.media_player.browse_media import async_process_play_media_url from homeassistant.components.media_player.browse_media import async_process_play_media_url
@@ -19,7 +20,7 @@ from homeassistant.components.media_player import (
RepeatMode, RepeatMode,
) )
VERSION = '0.9.407' VERSION = '0.9.410'
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@@ -130,6 +131,7 @@ class yoradioDevice(MediaPlayerEntity):
self._max_volume = max_volume self._max_volume = max_volume
async def async_added_to_hass(self): 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+'/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+'/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") await mqtt.async_subscribe(self.api.hass, self.api.root_topic+'/volume', self.volume_listener, 0, "utf-8")

View File

@@ -230,6 +230,9 @@ Work is in progress...
--- ---
## Version history ## Version history
#### v0.9.337b (homeassistant component)
- fixed the error of subscribing to mqtt topic on some systems
#### v0.9.337b #### v0.9.337b
- added support for Arduino ESP32 v3.0.0 and later - 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 - disabled SD indexing on startup; now the card is indexed only if the `data/index.dat` file is missing from the card