From 55fddc3385ab2cc993bb4690c41801898b532e30 Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Wed, 11 Sep 2024 09:01:22 +0300 Subject: [PATCH] Coerce zeroconf IP address and port 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( --- custom_components/vinx/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/vinx/config_flow.py b/custom_components/vinx/config_flow.py index e3ca8fd..1531018 100644 --- a/custom_components/vinx/config_flow.py +++ b/custom_components/vinx/config_flow.py @@ -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()