diff --git a/pkgs/servers/home-assistant/custom-components/frigate/async-publish-compat.patch b/pkgs/servers/home-assistant/custom-components/frigate/async-publish-compat.patch new file mode 100644 index 000000000000..788516befaa3 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-components/frigate/async-publish-compat.patch @@ -0,0 +1,216 @@ +diff --git a/custom_components/frigate/camera.py b/custom_components/frigate/camera.py +index 581de81..802d38b 100644 +--- a/custom_components/frigate/camera.py ++++ b/custom_components/frigate/camera.py +@@ -401,6 +401,7 @@ class FrigateCamera( + "ON", + 0, + False, ++ message_expiry_interval=None + ) + + async def async_turn_off(self) -> None: +@@ -412,6 +413,7 @@ class FrigateCamera( + "OFF", + 0, + False, ++ message_expiry_interval=None + ) + + async def async_enable_motion_detection(self) -> None: +@@ -422,6 +424,7 @@ class FrigateCamera( + "ON", + 0, + False, ++ message_expiry_interval=None + ) + + async def async_disable_motion_detection(self) -> None: +@@ -432,6 +435,7 @@ class FrigateCamera( + "OFF", + 0, + False, ++ message_expiry_interval=None + ) + + async def export_recording( +@@ -468,6 +472,7 @@ class FrigateCamera( + f"{action}{f'_{argument}' if argument else ''}", + 0, + False, ++ message_expiry_interval=None + ) + + async def create_event( +diff --git a/custom_components/frigate/number.py b/custom_components/frigate/number.py +index 5866438..7f53ddd 100644 +--- a/custom_components/frigate/number.py ++++ b/custom_components/frigate/number.py +@@ -143,6 +143,7 @@ class FrigateMotionContourArea(FrigateMQTTEntity, NumberEntity): + int(value), + 0, + False, ++ message_expiry_interval=None + ) + + @property +@@ -236,6 +237,7 @@ class FrigateMotionThreshold(FrigateMQTTEntity, NumberEntity): + int(value), + 0, + False, ++ message_expiry_interval=None + ) + + @property +diff --git a/custom_components/frigate/select.py b/custom_components/frigate/select.py +index 4b82d0e..e460b16 100644 +--- a/custom_components/frigate/select.py ++++ b/custom_components/frigate/select.py +@@ -121,4 +121,5 @@ class FrigateProfileSelect(FrigateMQTTEntity, SelectEntity): + option, + 0, + False, ++ message_expiry_interval=None + ) +diff --git a/custom_components/frigate/switch.py b/custom_components/frigate/switch.py +index 4d4c809..6b7e362 100644 +--- a/custom_components/frigate/switch.py ++++ b/custom_components/frigate/switch.py +@@ -211,6 +211,7 @@ class FrigateSwitch(FrigateMQTTEntity, SwitchEntity): + "ON", + 0, + False, ++ message_expiry_interval=None + ) + + async def async_turn_off(self, **kwargs: Any) -> None: +@@ -221,4 +222,5 @@ class FrigateSwitch(FrigateMQTTEntity, SwitchEntity): + "OFF", + 0, + False, ++ message_expiry_interval=None + ) +diff --git a/tests/test_camera.py b/tests/test_camera.py +index 00aa0a8..5a813df 100644 +--- a/tests/test_camera.py ++++ b/tests/test_camera.py +@@ -544,7 +544,7 @@ async def test_camera_enable_camera(hass: HomeAssistant, mqtt_mock: Any) -> None + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/enabled/set", "ON", 0, False ++ "frigate/front_door/enabled/set", "ON", 0, False, message_expiry_interval=None + ) + + +@@ -571,7 +571,7 @@ async def test_camera_disable_camera(hass: HomeAssistant, mqtt_mock: Any) -> Non + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/enabled/set", "OFF", 0, False ++ "frigate/front_door/enabled/set", "OFF", 0, False, message_expiry_interval=None + ) + + +@@ -600,7 +600,7 @@ async def test_camera_enable_motion_detection( + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/motion/set", "ON", 0, False ++ "frigate/front_door/motion/set", "ON", 0, False, message_expiry_interval=None + ) + + +@@ -629,7 +629,7 @@ async def test_camera_disable_motion_detection( + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/motion/set", "OFF", 0, False ++ "frigate/front_door/motion/set", "OFF", 0, False, message_expiry_interval=None + ) + + +@@ -872,7 +872,7 @@ async def test_ptz_move_service_call( + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/ptz", "move_up", 0, False ++ "frigate/front_door/ptz", "move_up", 0, False, message_expiry_interval=None + ) + + +@@ -895,7 +895,7 @@ async def test_ptz_preset_service_call( + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/ptz", "preset_main", 0, False ++ "frigate/front_door/ptz", "preset_main", 0, False, message_expiry_interval=None + ) + + +@@ -917,7 +917,7 @@ async def test_ptz_stop_service_call( + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/ptz", "stop", 0, False ++ "frigate/front_door/ptz", "stop", 0, False, message_expiry_interval=None + ) + + +diff --git a/tests/test_number.py b/tests/test_number.py +index 13d0e69..e2a09e6 100644 +--- a/tests/test_number.py ++++ b/tests/test_number.py +@@ -117,7 +117,7 @@ async def test_contour_area_set(hass: HomeAssistant, mqtt_mock: Any) -> None: + ) + + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/motion_contour_area/set", "35", 0, False ++ "frigate/front_door/motion_contour_area/set", "35", 0, False, message_expiry_interval=None + ) + + +@@ -140,7 +140,7 @@ async def test_threshold_set(hass: HomeAssistant, mqtt_mock: Any) -> None: + ) + + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/motion_threshold/set", "35", 0, False ++ "frigate/front_door/motion_threshold/set", "35", 0, False, message_expiry_interval=None + ) + + +diff --git a/tests/test_select.py b/tests/test_select.py +index e9fc02a..ea1241c 100644 +--- a/tests/test_select.py ++++ b/tests/test_select.py +@@ -89,7 +89,7 @@ async def test_profile_select_option(hass: HomeAssistant, mqtt_mock: Any) -> Non + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/profile/set", "away", 0, False ++ "frigate/profile/set", "away", 0, False, message_expiry_interval=None + ) + + +diff --git a/tests/test_switch.py b/tests/test_switch.py +index 01b9dae..f3288a1 100644 +--- a/tests/test_switch.py ++++ b/tests/test_switch.py +@@ -126,7 +126,7 @@ async def test_switch_turn_on(hass: HomeAssistant, mqtt_mock: Any) -> None: + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/detect/set", "ON", 0, False ++ "frigate/front_door/detect/set", "ON", 0, False, message_expiry_interval=None + ) + + +@@ -144,7 +144,7 @@ async def test_switch_turn_off(hass: HomeAssistant, mqtt_mock: Any) -> None: + blocking=True, + ) + mqtt_mock.async_publish.assert_called_once_with( +- "frigate/front_door/detect/set", "OFF", 0, False ++ "frigate/front_door/detect/set", "OFF", 0, False, message_expiry_interval=None + ) + + diff --git a/pkgs/servers/home-assistant/custom-components/frigate/package.nix b/pkgs/servers/home-assistant/custom-components/frigate/package.nix index 72a8a23c2e98..f390a4a79ed4 100644 --- a/pkgs/servers/home-assistant/custom-components/frigate/package.nix +++ b/pkgs/servers/home-assistant/custom-components/frigate/package.nix @@ -19,13 +19,13 @@ buildHomeAssistantComponent rec { owner = "blakeblackshear"; domain = "frigate"; - version = "5.15.3"; + version = "5.15.4"; src = fetchFromGitHub { owner = "blakeblackshear"; repo = "frigate-hass-integration"; tag = "v${version}"; - hash = "sha256-ZDTwC5dm9kAgT/pIHQAK56L2pjyf/PmOjDr0F+Fr+JA="; + hash = "sha256-xckHpwKujlWJ0M/fDlCU96WocMIlMk37+TwmY8iEnNo="; }; patches = [ @@ -33,6 +33,10 @@ buildHomeAssistantComponent rec { ./service-to-action.patch # https://github.com/blakeblackshear/frigate-hass-integration/pull/1085 ./llmcontext-user-prompt.patch + # https://github.com/blakeblackshear/frigate-hass-integration/pull/1096 + ./async-publish-compat.patch + # https://github.com/blakeblackshear/frigate-hass-integration/pull/1095 + ./remove-advanced-options-gate.patch ]; dependencies = [ diff --git a/pkgs/servers/home-assistant/custom-components/frigate/remove-advanced-options-gate.patch b/pkgs/servers/home-assistant/custom-components/frigate/remove-advanced-options-gate.patch new file mode 100644 index 000000000000..b95bd77a8298 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-components/frigate/remove-advanced-options-gate.patch @@ -0,0 +1,57 @@ +From 88c34b9d3bc34307cae90e286aa5305e7d74fb91 Mon Sep 17 00:00:00 2001 +From: Martin Weinelt +Date: Thu, 4 Jun 2026 18:28:22 +0200 +Subject: [PATCH] Remove advanced options gate + +https://developers.home-assistant.io/blog/2026/05/26/advanced-mode-config-flow-deprecation/ +--- + custom_components/frigate/config_flow.py | 3 --- + tests/test_config_flow.py | 23 ----------------------- + 2 files changed, 26 deletions(-) + +diff --git a/custom_components/frigate/config_flow.py b/custom_components/frigate/config_flow.py +index 263dcff0..45d7c8d6 100644 +--- a/custom_components/frigate/config_flow.py ++++ b/custom_components/frigate/config_flow.py +@@ -161,9 +161,6 @@ async def async_step_init( + if user_input is not None: + return self.async_create_entry(title="", data=user_input) + +- if not self.show_advanced_options: +- return self.async_abort(reason="only_advanced_options") +- + schema: dict[Any, Any] = { + # Whether to enable Frigate-native WebRTC for camera streaming + vol.Optional( +diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py +index 41b38408..1a4011f3 100644 +--- a/tests/test_config_flow.py ++++ b/tests/test_config_flow.py +@@ -281,26 +281,3 @@ async def test_options_advanced(hass: HomeAssistant) -> None: + assert result["data"][CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS] == 60 + assert not result["data"][CONF_NOTIFICATION_PROXY_ENABLE] + assert not result["data"][CONF_MEDIA_BROWSER_ENABLE] +- +- +-async def test_options(hass: HomeAssistant) -> None: +- """Check an options flow without advanced options.""" +- +- config_entry = create_mock_frigate_config_entry(hass) +- mock_client = create_mock_frigate_client() +- +- with patch( +- "custom_components.frigate.config_flow.FrigateApiClient", +- return_value=mock_client, +- ), patch( +- "custom_components.frigate.async_setup_entry", +- return_value=True, +- ): +- await hass.async_block_till_done() +- +- result = await hass.config_entries.options.async_init( +- config_entry.entry_id, +- ) +- +- assert result["type"] == FlowResultType.ABORT +- assert result["reason"] == "only_advanced_options" +