-
-
Notifications
You must be signed in to change notification settings - Fork 37.1k
Use SsdpServiceInfo for SOURCE_SSDP tests (part 4) #60339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1b7c34b
b5d8dcb
a71c8a1
68beade
140525e
41b624f
4bd4229
192a6d8
bf4c8bb
4831f81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |||||||||
| from __future__ import annotations | ||||||||||
|
|
||||||||||
| import asyncio | ||||||||||
| from collections.abc import Awaitable | ||||||||||
| from collections.abc import Awaitable, Iterator | ||||||||||
| from dataclasses import dataclass, field | ||||||||||
| from datetime import timedelta | ||||||||||
| from enum import Enum | ||||||||||
|
|
@@ -144,7 +144,7 @@ def __getitem__(self, name: str) -> Any: | |||||||||
| # Use a property if it is available, fallback to upnp data | ||||||||||
| if hasattr(self, name): | ||||||||||
| return getattr(self, name) | ||||||||||
| return self.upnp.get(name) | ||||||||||
| return self.upnp[name] | ||||||||||
|
|
||||||||||
| def get(self, name: str, default: Any = None) -> Any: | ||||||||||
| """ | ||||||||||
|
|
@@ -164,6 +164,22 @@ def get(self, name: str, default: Any = None) -> Any: | |||||||||
| return getattr(self, name) | ||||||||||
| return self.upnp.get(name, default) | ||||||||||
|
|
||||||||||
| def __iter__(self) -> Iterator[str]: | ||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is required for core/homeassistant/components/konnected/config_flow.py Lines 253 to 256 in fb909ec
As in https://github.com/home-assistant/core/pull/60334/files#r756924593, this might need to be added to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably should since its a temp measure and the goal is to avoid a breaking change |
||||||||||
| """ | ||||||||||
| Implement iter(self) on upnp data. | ||||||||||
|
|
||||||||||
| Deprecated, and will be removed in version 2022.6. | ||||||||||
| """ | ||||||||||
| if not self._warning_logged: | ||||||||||
| report( | ||||||||||
| "accessed discovery_info.__iter__() instead of discovery_info.upnp.__iter__(); this will fail in version 2022.6", | ||||||||||
| exclude_integrations={"ssdp"}, | ||||||||||
| error_if_core=False, | ||||||||||
| level=logging.DEBUG, | ||||||||||
| ) | ||||||||||
| self._warning_logged = True | ||||||||||
| return self.upnp.__iter__() | ||||||||||
|
|
||||||||||
|
|
||||||||||
| @bind_hass | ||||||||||
| async def async_register_callback( | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.