<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def set_room_temperatures_by_name(self, room_name, sleep_temp=None, comfort_temp=None, away_temp=None):
 """Set room temps by name."""

        if sleep_temp is None and comfort_temp is None and away_temp is None:
            return
        for room_id, _room in self.rooms.items():
            if _room.name == room_name:
                await self.set_room_temperatures(room_id, sleep_temp,
                                                 comfort_temp, away_temp)
                return
        _LOGGER.error("Could not find a room with name %s", room_name)