From 9a9c5ce291cb661c018e65038296a308eec66328 Mon Sep 17 00:00:00 2001 From: Chris ter Beke <1134120+ChrisTerBeke@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:55:16 +0200 Subject: [PATCH] Do not re-init on every interval --- drivers/uponor/device.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/uponor/device.ts b/drivers/uponor/device.ts index 9893570..ababe76 100644 --- a/drivers/uponor/device.ts +++ b/drivers/uponor/device.ts @@ -34,10 +34,6 @@ class UponorThermostatDevice extends Device { this._updateAddress(discoveryResult.address, true) } - async onDiscoveryLastSeenChanged(discoveryResult: DiscoveryResultMAC): Promise { - this._updateAddress(discoveryResult.address, true) - } - async onSettings({ newSettings }: { newSettings: { [key: string]: any } }): Promise { const addressUpdated = await this._updateAddress(newSettings.address as string) if (!addressUpdated) throw new Error(`Could not connect to Uponor controller on IP address ${newSettings.address}`) @@ -77,7 +73,7 @@ class UponorThermostatDevice extends Device { this._syncInterval = setInterval(this._syncAttributes.bind(this), POLL_INTERVAL_MS) this._syncAttributes() } catch (error) { - this.setUnavailable(`Could not connect to Uponor controller on IP address ${address}`) + this.setUnavailable(`Error connecting to Uponor controller: ${error}`) } }