Skip to content

Commit

Permalink
Merge pull request #115 from ThomasLomas/camera-bug
Browse files Browse the repository at this point in the history
- Fixes web rtc candidate error
- Fixes deprecation warning
  • Loading branch information
ThomasLomas authored Dec 31, 2024
2 parents 7cee89e + 3fa98c6 commit e861cec
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ThomasLomas/ha-starlinghomehub",
"image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm",
"image": "mcr.microsoft.com/devcontainers/python:3.13-bookworm",
"postCreateCommand": "scripts/setup",
"forwardPorts": [
8123
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: "Set up Python"
uses: actions/[email protected]
with:
python-version: "3.12"
python-version: "3.13"
cache: "pip"

- name: "Install requirements"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/starling_home_hub/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

NAME = "Starling Home Hub Integration"
DOMAIN = "starling_home_hub"
VERSION = "1.3.0"
VERSION = "1.4.0"
ATTRIBUTION = "Based on the Starling Home Hub Developer Connect API"

CONF_ENABLE_RTSP_STREAM = "enable_rtsp_stream"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import asyncio
from collections.abc import Callable
from datetime import datetime, timedelta, timezone
from webrtc_models import RTCIceCandidate

from homeassistant.components.camera import StreamType, WebRTCAnswer, WebRTCClientConfiguration, WebRTCSendMessage
from homeassistant.components.camera import WebRTCAnswer, WebRTCClientConfiguration, WebRTCSendMessage
from homeassistant.core import callback
from homeassistant.helpers.event import async_track_point_in_utc_time

Expand Down Expand Up @@ -34,12 +35,6 @@ def __init__(

super().__init__(device_id, coordinator, "webrtc")

@property
def frontend_stream_type(self) -> StreamType | None:
"""Return the type of stream supported by this camera."""

return StreamType.WEB_RTC

async def stream_source(self) -> str | None:
"""Return stream source for the camera."""

Expand Down Expand Up @@ -96,6 +91,12 @@ async def async_will_remove_from_hass(self) -> None:

self._stream = None

async def async_on_webrtc_candidate(
self, session_id: str, candidate: RTCIceCandidate
) -> None:
"""Ignore WebRTC candidates for Nest cloud based cameras."""
return

@callback
def close_webrtc_session(self, session_id: str) -> None:
"""Close a WebRTC session."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/starling_home_hub/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"documentation": "https://github.com/ThomasLomas/ha-starlinghomehub",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/ThomasLomas/ha-starlinghomehub/issues",
"version": "1.3.0"
"version": "1.4.0"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Starling Home Hub Integration",
"filename": "starling_home_hub.zip",
"hide_default_branch": true,
"homeassistant": "2024.1.6",
"homeassistant": "2024.12.5",
"render_readme": true,
"zip_release": true
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
colorlog==6.9.0
homeassistant==2024.11.1
homeassistant==2024.12.5
pip>=21.0,<24.4
ruff==0.8.4

0 comments on commit e861cec

Please sign in to comment.