From cd4358ed9ef28f883950f6828af95c039e118e9e Mon Sep 17 00:00:00 2001
From: Sid <27780930+autinerd@users.noreply.github.com>
Date: Wed, 10 Jul 2024 17:46:39 +0200
Subject: [PATCH] Allow enigma2 devices to use different source bouquets
 (#121686)

---
 homeassistant/components/enigma2/__init__.py   | 6 +++++-
 homeassistant/components/enigma2/manifest.json | 2 +-
 requirements_all.txt                           | 2 +-
 requirements_test_all.txt                      | 2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/homeassistant/components/enigma2/__init__.py b/homeassistant/components/enigma2/__init__.py
index 4e4f8bdb687..de8283a5533 100644
--- a/homeassistant/components/enigma2/__init__.py
+++ b/homeassistant/components/enigma2/__init__.py
@@ -16,6 +16,8 @@ from homeassistant.const import (
 from homeassistant.core import HomeAssistant
 from homeassistant.helpers.aiohttp_client import async_create_clientsession
 
+from .const import CONF_SOURCE_BOUQUET
+
 type Enigma2ConfigEntry = ConfigEntry[OpenWebIfDevice]
 
 PLATFORMS = [Platform.MEDIA_PLAYER]
@@ -35,7 +37,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: Enigma2ConfigEntry) -> b
         hass, verify_ssl=entry.data[CONF_VERIFY_SSL], base_url=base_url
     )
 
-    entry.runtime_data = OpenWebIfDevice(session)
+    entry.runtime_data = OpenWebIfDevice(
+        session, source_bouquet=entry.options.get(CONF_SOURCE_BOUQUET)
+    )
     await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
     return True
 
diff --git a/homeassistant/components/enigma2/manifest.json b/homeassistant/components/enigma2/manifest.json
index ef08314e541..538cfb56388 100644
--- a/homeassistant/components/enigma2/manifest.json
+++ b/homeassistant/components/enigma2/manifest.json
@@ -7,5 +7,5 @@
   "integration_type": "device",
   "iot_class": "local_polling",
   "loggers": ["openwebif"],
-  "requirements": ["openwebifpy==4.2.4"]
+  "requirements": ["openwebifpy==4.2.5"]
 }
diff --git a/requirements_all.txt b/requirements_all.txt
index 7aa6b9d002b..b404965b258 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -1496,7 +1496,7 @@ openhomedevice==2.2.0
 opensensemap-api==0.2.0
 
 # homeassistant.components.enigma2
-openwebifpy==4.2.4
+openwebifpy==4.2.5
 
 # homeassistant.components.luci
 openwrt-luci-rpc==1.1.17
diff --git a/requirements_test_all.txt b/requirements_test_all.txt
index f1d5dd07b5c..10ef337cadb 100644
--- a/requirements_test_all.txt
+++ b/requirements_test_all.txt
@@ -1208,7 +1208,7 @@ openerz-api==0.3.0
 openhomedevice==2.2.0
 
 # homeassistant.components.enigma2
-openwebifpy==4.2.4
+openwebifpy==4.2.5
 
 # homeassistant.components.opower
 opower==0.4.7
-- 
GitLab