1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-11-17 01:23:43 -05:00

Add update entity

This commit is contained in:
Nathan Spencer
2024-07-17 09:44:32 -06:00
parent 07446f56da
commit 7c8ca361ba
4 changed files with 128 additions and 52 deletions

View File

@@ -41,7 +41,8 @@ class OasisMiniSelectEntity(OasisMiniEntity, SelectEntity):
for track in self.device.playlist
]
self._attr_options = options
self._attr_current_option = options[self.device.playlist_index]
index = min(self.device.playlist_index, len(options) - 1)
self._attr_current_option = options[index]
if self.hass:
return super()._handle_coordinator_update()