Skip to content

Commit

Permalink
Improve IPv4 check
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTerBeke committed Oct 19, 2024
1 parent 1dcff5c commit 03727ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/uponor/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class UponorThermostatDevice extends Device {

private _getAddress(): string | undefined {
const settingAddress = this.getSetting('address')
if (settingAddress && settingAddress.length > 0) return settingAddress
if (settingAddress && isIPv4(settingAddress)) return settingAddress
const storeAddress = this.getStoreValue('address')
if (storeAddress && storeAddress.length > 0) return storeAddress
if (storeAddress && isIPv4(settingAddress)) return storeAddress
return undefined
}

Expand Down

0 comments on commit 03727ef

Please sign in to comment.