Add current temperature to master climate entity in Advantage Air ()

* Add current_temperature

* Update tests
pull/102978/head
Brett Adams 2023-10-29 05:59:02 +10:00 committed by GitHub
parent b1aeaf2296
commit a4c31f63bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions
homeassistant/components/advantage_air
tests/components/advantage_air

View File

@ -122,6 +122,13 @@ class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
if self._ac.get(ADVANTAGE_AIR_AUTOFAN):
self._attr_fan_modes += [FAN_AUTO]
@property
def current_temperature(self) -> float | None:
"""Return the selected zones current temperature."""
if self._myzone:
return self._myzone["measuredTemp"]
return None
@property
def target_temperature(self) -> float | None:
"""Return the current target temperature."""

View File

@ -73,7 +73,7 @@ async def test_climate_async_setup_entry(
assert state.attributes.get(ATTR_MIN_TEMP) == 16
assert state.attributes.get(ATTR_MAX_TEMP) == 32
assert state.attributes.get(ATTR_TEMPERATURE) == 24
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) is None
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 25
entry = registry.async_get(entity_id)
assert entry