Bug fixes
This commit is contained in:
parent
ce5c15bcd7
commit
0a42f5cab1
@ -1,6 +1,6 @@
|
||||
name: "Fritz!Box Temperature Sync"
|
||||
description: "Sync Fritz!DECT thermostat temperatures with other sensors in Home Assistant"
|
||||
version: "0.5.1"
|
||||
version: "0.5.2"
|
||||
startup: "application"
|
||||
stage: "stable"
|
||||
slug: "fritz_temp_sync"
|
||||
|
||||
@ -242,12 +242,15 @@ class FritzBox:
|
||||
logger.debug("No id or name given")
|
||||
return None
|
||||
|
||||
if name is None:
|
||||
name = ""
|
||||
|
||||
devices = await self.list_devices()
|
||||
if devices is None:
|
||||
return None
|
||||
found_device: Optional[Device] = None
|
||||
for candidate in devices:
|
||||
if candidate.id == idx or candidate.display_name == name:
|
||||
if candidate.id == idx or candidate.display_name.strip() == name.strip():
|
||||
found_device = candidate
|
||||
break
|
||||
|
||||
@ -280,6 +283,10 @@ class FritzBox:
|
||||
"oldpage": "/net/home_auto_hkr_edit.lua",
|
||||
}
|
||||
data.update(device.to_web_data())
|
||||
if "Mintemp" not in data:
|
||||
data["Mintemp"] = "16"
|
||||
if "Maxtemp" not in data:
|
||||
data["Maxtemp"] = "23"
|
||||
|
||||
await self._request("POST", f"{self.url}/{self._endpoints['data']}", data)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user