about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/home-assistant/patches/ffmpeg-path.patch
blob: 5417c64f13eac860623bffa706bb3518d8ba4ae4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
diff --git a/homeassistant/components/ffmpeg/__init__.py b/homeassistant/components/ffmpeg/__init__.py
index 4ab4ee32a0..0f04f037f6 100644
--- a/homeassistant/components/ffmpeg/__init__.py
+++ b/homeassistant/components/ffmpeg/__init__.py
@@ -46,7 +46,7 @@ CONF_FFMPEG_BIN = "ffmpeg_bin"
 CONF_EXTRA_ARGUMENTS = "extra_arguments"
 CONF_OUTPUT = "output"
 
-DEFAULT_BINARY = "ffmpeg"
+DEFAULT_BINARY = "@ffmpeg@"
 
 CONFIG_SCHEMA = vol.Schema(
     {
diff --git a/tests/components/ffmpeg/test_binary_sensor.py b/tests/components/ffmpeg/test_binary_sensor.py
index 6eec115d6f..c55b4fb26c 100644
--- a/tests/components/ffmpeg/test_binary_sensor.py
+++ b/tests/components/ffmpeg/test_binary_sensor.py
@@ -24,7 +24,7 @@ async def test_noise_setup_component(hass: HomeAssistant) -> None:
         await async_setup_component(hass, "binary_sensor", CONFIG_NOISE)
     await hass.async_block_till_done()
 
-    assert hass.data["ffmpeg"].binary == "ffmpeg"
+    assert hass.data["ffmpeg"].binary == "@ffmpeg@"
     assert hass.states.get("binary_sensor.ffmpeg_noise") is not None
 
 
@@ -35,7 +35,7 @@ async def test_noise_setup_component_start(mock_start, hass: HomeAssistant):
         await async_setup_component(hass, "binary_sensor", CONFIG_NOISE)
     await hass.async_block_till_done()
 
-    assert hass.data["ffmpeg"].binary == "ffmpeg"
+    assert hass.data["ffmpeg"].binary == "@ffmpeg@"
     assert hass.states.get("binary_sensor.ffmpeg_noise") is not None
 
     hass.bus.async_fire(EVENT_HOMEASSISTANT_START)
@@ -55,7 +55,7 @@ async def test_noise_setup_component_start_callback(mock_ffmpeg, hass: HomeAssis
         await async_setup_component(hass, "binary_sensor", CONFIG_NOISE)
     await hass.async_block_till_done()
 
-    assert hass.data["ffmpeg"].binary == "ffmpeg"
+    assert hass.data["ffmpeg"].binary == "@ffmpeg@"
     assert hass.states.get("binary_sensor.ffmpeg_noise") is not None
 
     hass.bus.async_fire(EVENT_HOMEASSISTANT_START)
@@ -80,7 +80,7 @@ async def test_motion_setup_component(hass: HomeAssistant) -> None:
         await async_setup_component(hass, "binary_sensor", CONFIG_MOTION)
     await hass.async_block_till_done()
 
-    assert hass.data["ffmpeg"].binary == "ffmpeg"
+    assert hass.data["ffmpeg"].binary == "@ffmpeg@"
     assert hass.states.get("binary_sensor.ffmpeg_motion") is not None
 
 
@@ -91,7 +91,7 @@ async def test_motion_setup_component_start(mock_start, hass: HomeAssistant):
         await async_setup_component(hass, "binary_sensor", CONFIG_MOTION)
     await hass.async_block_till_done()
 
-    assert hass.data["ffmpeg"].binary == "ffmpeg"
+    assert hass.data["ffmpeg"].binary == "@ffmpeg@"
     assert hass.states.get("binary_sensor.ffmpeg_motion") is not None
 
     hass.bus.async_fire(EVENT_HOMEASSISTANT_START)
@@ -111,7 +111,7 @@ async def test_motion_setup_component_start_callback(mock_ffmpeg, hass: HomeAssi
         await async_setup_component(hass, "binary_sensor", CONFIG_MOTION)
     await hass.async_block_till_done()
 
-    assert hass.data["ffmpeg"].binary == "ffmpeg"
+    assert hass.data["ffmpeg"].binary == "@ffmpeg@"
     assert hass.states.get("binary_sensor.ffmpeg_motion") is not None
 
     hass.bus.async_fire(EVENT_HOMEASSISTANT_START)
diff --git a/tests/components/ffmpeg/test_init.py b/tests/components/ffmpeg/test_init.py
index 452a818859..41ba776436 100644
--- a/tests/components/ffmpeg/test_init.py
+++ b/tests/components/ffmpeg/test_init.py
@@ -81,7 +81,7 @@ def test_setup_component():
         with assert_setup_component(1):
             setup_component(hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}})
 
-        assert hass.data[ffmpeg.DATA_FFMPEG].binary == "ffmpeg"
+        assert hass.data[ffmpeg.DATA_FFMPEG].binary == "@ffmpeg@"
         hass.stop()