Skip to content
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

Use new ServiceInfo location in homeassistant_sky_connect #135693

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
OptionsFlow,
)
from homeassistant.core import callback
from homeassistant.helpers.service_info.usb import UsbServiceInfo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: usb is still imported
It is listed in dependencies in manifest.json


from .const import DOCS_WEB_FLASHER_URL, DOMAIN, HardwareVariant
from .util import get_hardware_variant, get_usb_service_info
Expand Down Expand Up @@ -69,7 +70,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Initialize the config flow."""
super().__init__(*args, **kwargs)

self._usb_info: usb.UsbServiceInfo | None = None
self._usb_info: UsbServiceInfo | None = None
self._hw_variant: HardwareVariant | None = None

@staticmethod
Expand All @@ -85,9 +86,7 @@ def async_get_options_flow(

return HomeAssistantSkyConnectOptionsFlowHandler(config_entry)

async def async_step_usb(
self, discovery_info: usb.UsbServiceInfo
) -> ConfigFlowResult:
async def async_step_usb(self, discovery_info: UsbServiceInfo) -> ConfigFlowResult:
"""Handle usb discovery."""
device = discovery_info.device
vid = discovery_info.vid
Expand Down