Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ one has the time to go through the source.

### Air-to-air heat pump properties
* `room_temperature`
* `outdoor_temperature`
* `target_temperature`
* `target_temperature_step`
* `target_temperature_min`
Expand Down
17 changes: 17 additions & 0 deletions src/pymelcloud/ata_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,23 @@ def room_temperature(self) -> Optional[float]:
return None
return self._state.get("RoomTemperature")

@property
def has_outdoor_temperature(self) -> bool:
"""Return True if the device has an outdoor temperature sensor."""
if self._device_conf.get("HideOutdoorTemperature", False):
return False
return self._device_conf.get("Device", {}).get("HasOutdoorTemperature", False):

@property
def outdoor_temperature(self) -> Optional[float]:
"""Return outdoor temperature reported by the device."""
if self._device_conf.get("HideOutdoorTemperature", False):
return None
device = self._device_conf.get("Device", {})
if not device.get("HasOutdoorTemperature", False):
return None
return device.get("OutdoorTemperature")

@property
def target_temperature(self) -> Optional[float]:
"""Return target temperature set for the device."""
Expand Down