Skip to content

Commit

Permalink
Coerce zeroconf IP address and port
Browse files Browse the repository at this point in the history
2024-09-11 08:58:39.039 ERROR (MainThread) [homeassistant.helpers.http] Unable to serialize to JSON. Bad data found at $.data_schema[0].default=10.211.0.74(<class 'zeroconf._utils.ipaddress.ZeroconfIPv4Address'>
  • Loading branch information
Jalle19 committed Sep 11, 2024
1 parent f9a2275 commit 55fddc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/vinx/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ async def async_step_zeroconf(self, discovery_info: ZeroconfServiceInfo) -> Conf
self._abort_if_unique_id_configured()

# Pre-populate the form
self.host = discovery_info.ip_address
self.port = discovery_info.port
self.host = str(discovery_info.ip_address)
self.port = int(discovery_info.port)

# Trigger the user configuration flow
return await self.async_step_user()

0 comments on commit 55fddc3

Please sign in to comment.