Relocate dhcp/ssdp/usb/zeroconf ServiceInfo models
· One min read
Summary of changes
To reduce current reliance on optional integrations for names that are in essence used as helpers, the following ServiceInfo models have been relocated:
DhcpServiceInfo
fromhomeassistant.components.dhcp
tohomeassistant.helpers.service_info.dhcp
SsdpServiceInfo
fromhomeassistant.components.ssdp
tohomeassistant.helpers.service_info.ssdp
UsbServiceInfo
fromhomeassistant.components.usb
tohomeassistant.helpers.service_info.usb
ZeroconfServiceInfo
fromhomeassistant.components.zeroconf
tohomeassistant.helpers.service_info.zeroconf
To update your integration:
- Replace the import statements as shown in the examples below
- Test your integration with the new imports
The old import locations are deprecated and will be removed in Home Assistant 2026.2.
Examples
# Old
# from homeassistant.components.dhcp import DhcpServiceInfo
# from homeassistant.components.ssdp import SsdpServiceInfo
# from homeassistant.components.usb import UsbServiceInfo
# from homeassistant.components.zeroconf import ZeroconfServiceInfo
# New
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
from homeassistant.helpers.service_info.ssdp import SsdpServiceInfo
from homeassistant.helpers.service_info.usb import UsbServiceInfo
from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo
class MyConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
async def async_step_dhcp(self, discovery_info: DhcpServiceInfo) -> ConfigFlowResult:
"""Handle dhcp discovery."""
...
async def async_step_ssdp(self, discovery_info: SsdpServiceInfo) -> ConfigFlowResult:
"""Handle ssdp discovery."""
...
async def async_step_usb(self, discovery_info: UsbServiceInfo) -> ConfigFlowResult:
"""Handle usb discovery."""
...
async def async_step_zeroconf(self, discovery_info: ZeroconfServiceInfo) -> ConfigFlowResult:
"""Handle zeroconf discovery."""
...