Skip to content

Commit

Permalink
Fix cloud streams for HA 2024.4 (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
dext0r committed Apr 8, 2024
1 parent 886f314 commit 28e67aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion custom_components/yandex_smart_home/cloud_stream.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Implement the Yandex Smart Home cloud connection manager for video streaming."""

import asyncio
from datetime import timedelta
import logging
Expand Down Expand Up @@ -29,6 +30,11 @@
from pydantic import BaseModel
import yarl

try:
from homeassistant.helpers.http import KEY_HASS
except ImportError:
KEY_HASS = "hass" # type: ignore

from .const import CLOUD_STREAM_BASE_URL

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -58,7 +64,7 @@ class WebRequest:

def __init__(self, hass: HomeAssistant, url: yarl.URL):
"""Initialize web request from url."""
self.app = {"hass": hass}
self.app = {KEY_HASS: hass}
self._url = url

@property
Expand Down

0 comments on commit 28e67aa

Please sign in to comment.