Merge pull request #3 from sudoxnym/fix-jellyfin-setup-error-and-deprecations.2025-09-15.05-52-49

Update Jellyfin integration for latest HA API
This commit is contained in:
sudoxnym 2025-09-14 23:54:29 -06:00 committed by GitHub
commit 1428d0ad96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,7 @@ import voluptuous as vol
from homeassistant import config_entries, exceptions from homeassistant import config_entries, exceptions
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.const import ( # pylint: disable=import-error from homeassistant.const import ( # pylint: disable=import-error
CONF_URL, CONF_URL,
CONF_VERIFY_SSL, CONF_VERIFY_SSL,
CONF_USERNAME, CONF_USERNAME,
@ -28,24 +28,27 @@ RESULT_CONN_ERROR = "cannot_connect"
RESULT_LOG_MESSAGE = {RESULT_CONN_ERROR: "Connection error"} RESULT_LOG_MESSAGE = {RESULT_CONN_ERROR: "Connection error"}
class JellyfinFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): class JellyfinFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Config flow for Jellyfin component.""" """Config flow for Jellyfin component."""
VERSION = 1 VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
@staticmethod @staticmethod
@callback @callback
def async_get_options_flow(config_entry): def async_get_options_flow(config_entry):
"""Jellyfin options callback.""" """Return the options flow handler."""
return JellyfinOptionsFlowHandler(config_entry) return JellyfinOptionsFlowHandler(config_entry)
def __init__(self): def __init__(self):
"""Init JellyfinFlowHandler.""" """Initialize the config flow."""
self._errors = {} self._errors = {}
self._url = None self._url = None
self._ssl = DEFAULT_SSL self._ssl = DEFAULT_SSL
self._verify_ssl = DEFAULT_VERIFY_SSL self._verify_ssl = DEFAULT_VERIFY_SSL
self._is_import = False
async def async_step_import(self, user_input=None): async def async_step_import(self, user_input=None):
"""Handle configuration by yaml file.""" """Handle configuration by yaml file."""