Skip to content

Commit 2138244

Browse files
authored
Merge branch 'dev' into util-network-stdlib
2 parents 3a35ed2 + f452c5b commit 2138244

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+614
-441
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,19 +1086,13 @@ jobs:
10861086
uses: actions/[email protected]
10871087
with:
10881088
pattern: coverage-*
1089-
- name: Upload coverage to Codecov (full coverage)
1089+
- name: Upload coverage to Codecov
10901090
if: needs.info.outputs.test_full_suite == 'true'
10911091
uses: codecov/[email protected]
10921092
with:
10931093
fail_ci_if_error: true
10941094
flags: full-suite
10951095
token: ${{ secrets.CODECOV_TOKEN }}
1096-
- name: Upload coverage to Codecov (partial coverage)
1097-
if: needs.info.outputs.test_full_suite == 'false'
1098-
uses: codecov/[email protected]
1099-
with:
1100-
fail_ci_if_error: true
1101-
token: ${{ secrets.CODECOV_TOKEN }}
11021096

11031097
pytest-partial:
11041098
runs-on: ubuntu-22.04
@@ -1224,14 +1218,7 @@ jobs:
12241218
uses: actions/[email protected]
12251219
with:
12261220
pattern: coverage-*
1227-
- name: Upload coverage to Codecov (full coverage)
1228-
if: needs.info.outputs.test_full_suite == 'true'
1229-
uses: codecov/[email protected]
1230-
with:
1231-
fail_ci_if_error: true
1232-
flags: full-suite
1233-
token: ${{ secrets.CODECOV_TOKEN }}
1234-
- name: Upload coverage to Codecov (partial coverage)
1221+
- name: Upload coverage to Codecov
12351222
if: needs.info.outputs.test_full_suite == 'false'
12361223
uses: codecov/[email protected]
12371224
with:

homeassistant/components/color_extractor/config_flow.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ async def async_step_user(
1818
self, user_input: dict[str, Any] | None = None
1919
) -> ConfigFlowResult:
2020
"""Handle a flow initialized by the user."""
21-
if self._async_current_entries():
22-
return self.async_abort(reason="single_instance_allowed")
23-
2421
if user_input is not None:
2522
return self.async_create_entry(title=DEFAULT_NAME, data={})
26-
2723
return self.async_show_form(step_id="user")

homeassistant/components/color_extractor/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"codeowners": ["@GenericStudent"],
55
"config_flow": true,
66
"documentation": "https://www.home-assistant.io/integrations/color_extractor",
7-
"requirements": ["colorthief==0.2.1"]
7+
"requirements": ["colorthief==0.2.1"],
8+
"single_config_entry": true
89
}

homeassistant/components/color_extractor/strings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
"user": {
55
"description": "[%key:common::config_flow::description::confirm_setup%]"
66
}
7-
},
8-
"abort": {
9-
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
107
}
118
},
129
"services": {

homeassistant/components/demo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
Platform.LIGHT,
3939
Platform.LOCK,
4040
Platform.MEDIA_PLAYER,
41+
Platform.NOTIFY,
4142
Platform.NUMBER,
4243
Platform.SELECT,
4344
Platform.SENSOR,
@@ -55,7 +56,6 @@
5556
COMPONENTS_WITH_DEMO_PLATFORM = [
5657
Platform.TTS,
5758
Platform.MAILBOX,
58-
Platform.NOTIFY,
5959
Platform.IMAGE_PROCESSING,
6060
Platform.DEVICE_TRACKER,
6161
]
Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
1-
"""Demo notification service."""
1+
"""Demo notification entity."""
22

33
from __future__ import annotations
44

5-
from typing import Any
6-
7-
from homeassistant.components.notify import BaseNotificationService
5+
from homeassistant.components.notify import DOMAIN, NotifyEntity
6+
from homeassistant.config_entries import ConfigEntry
87
from homeassistant.core import HomeAssistant
9-
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
8+
from homeassistant.helpers.device_registry import DeviceInfo
9+
from homeassistant.helpers.entity_platform import AddEntitiesCallback
1010

1111
EVENT_NOTIFY = "notify"
1212

1313

14-
def get_service(
14+
async def async_setup_entry(
1515
hass: HomeAssistant,
16-
config: ConfigType,
17-
discovery_info: DiscoveryInfoType | None = None,
18-
) -> BaseNotificationService:
19-
"""Get the demo notification service."""
20-
return DemoNotificationService(hass)
21-
22-
23-
class DemoNotificationService(BaseNotificationService):
24-
"""Implement demo notification service."""
25-
26-
def __init__(self, hass: HomeAssistant) -> None:
27-
"""Initialize the service."""
28-
self.hass = hass
29-
30-
@property
31-
def targets(self) -> dict[str, str]:
32-
"""Return a dictionary of registered targets."""
33-
return {"test target name": "test target id"}
34-
35-
def send_message(self, message: str = "", **kwargs: Any) -> None:
16+
config_entry: ConfigEntry,
17+
async_add_entities: AddEntitiesCallback,
18+
) -> None:
19+
"""Set up the demo entity platform."""
20+
async_add_entities([DemoNotifyEntity(unique_id="notify", device_name="Notifier")])
21+
22+
23+
class DemoNotifyEntity(NotifyEntity):
24+
"""Implement demo notification platform."""
25+
26+
_attr_has_entity_name = True
27+
_attr_name = None
28+
29+
def __init__(
30+
self,
31+
unique_id: str,
32+
device_name: str,
33+
) -> None:
34+
"""Initialize the Demo button entity."""
35+
self._attr_unique_id = unique_id
36+
self._attr_device_info = DeviceInfo(
37+
identifiers={(DOMAIN, unique_id)},
38+
name=device_name,
39+
)
40+
41+
async def async_send_message(self, message: str) -> None:
3642
"""Send a message to a user."""
37-
kwargs["message"] = message
38-
self.hass.bus.fire(EVENT_NOTIFY, kwargs)
43+
event_notitifcation = {"message": message}
44+
self.hass.bus.async_fire(EVENT_NOTIFY, event_notitifcation)

homeassistant/components/doods/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"documentation": "https://www.home-assistant.io/integrations/doods",
66
"iot_class": "local_polling",
77
"loggers": ["pydoods"],
8-
"requirements": ["pydoods==1.0.2", "Pillow==10.2.0"]
8+
"requirements": ["pydoods==1.0.2", "Pillow==10.3.0"]
99
}

homeassistant/components/generic/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"dependencies": ["http"],
77
"documentation": "https://www.home-assistant.io/integrations/generic",
88
"iot_class": "local_push",
9-
"requirements": ["ha-av==10.1.1", "Pillow==10.2.0"]
9+
"requirements": ["ha-av==10.1.1", "Pillow==10.3.0"]
1010
}

homeassistant/components/homekit/type_cameras.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
async_track_state_change_event,
2929
async_track_time_interval,
3030
)
31+
from homeassistant.util.async_ import create_eager_task
3132

3233
from .accessories import TYPES, HomeAccessory, HomeDriver
3334
from .const import (
@@ -431,7 +432,7 @@ async def start_stream(
431432
async def watch_session(_: Any) -> None:
432433
await self._async_ffmpeg_watch(session_info["id"])
433434

434-
session_info[FFMPEG_LOGGER] = asyncio.create_task(
435+
session_info[FFMPEG_LOGGER] = create_eager_task(
435436
self._async_log_stderr_stream(stderr_reader)
436437
)
437438
session_info[FFMPEG_WATCHER] = async_track_time_interval(

homeassistant/components/image_upload/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"documentation": "https://www.home-assistant.io/integrations/image_upload",
88
"integration_type": "system",
99
"quality_scale": "internal",
10-
"requirements": ["Pillow==10.2.0"]
10+
"requirements": ["Pillow==10.3.0"]
1111
}

0 commit comments

Comments
 (0)