Skip to content

Commit

Permalink
Fix Set room temps (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielhiversen authored Nov 30, 2023
1 parent 5daccab commit bbc19dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,11 @@ async def set_room_temperatures_by_name(
):
"""Set room temps by name."""
if sleep_temp is None and comfort_temp is None and away_temp is None:
_LOGGER.error("Missing input data %s", room_name)
return
for heater in self.devices.values():
if not isinstance(heater, Heater):
continue
if heater.room_name.lower().strip() == room_name.lower().strip():
await self.set_room_temperatures(
heater.room_id,
Expand Down Expand Up @@ -357,7 +360,7 @@ async def set_room_temperatures(
payload["roomComfortTemperature"] = comfort_temp

self._cached_data = {}
await self.request(f"rooms/{room_id}/temperature", payload, patch=True)
await self.request(f"rooms/{room_id}/temperature", payload)

async def fetch_heater_data(self):
"""Request data."""
Expand Down

0 comments on commit bbc19dc

Please sign in to comment.