mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add current temperature to master climate entity in Advantage Air (#102938)
* Add current_temperature * Update tests
This commit is contained in:
parent
b1aeaf2296
commit
a4c31f63bf
@ -122,6 +122,13 @@ class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
|
|||||||
if self._ac.get(ADVANTAGE_AIR_AUTOFAN):
|
if self._ac.get(ADVANTAGE_AIR_AUTOFAN):
|
||||||
self._attr_fan_modes += [FAN_AUTO]
|
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
|
@property
|
||||||
def target_temperature(self) -> float | None:
|
def target_temperature(self) -> float | None:
|
||||||
"""Return the current target temperature."""
|
"""Return the current target temperature."""
|
||||||
|
@ -73,7 +73,7 @@ async def test_climate_async_setup_entry(
|
|||||||
assert state.attributes.get(ATTR_MIN_TEMP) == 16
|
assert state.attributes.get(ATTR_MIN_TEMP) == 16
|
||||||
assert state.attributes.get(ATTR_MAX_TEMP) == 32
|
assert state.attributes.get(ATTR_MAX_TEMP) == 32
|
||||||
assert state.attributes.get(ATTR_TEMPERATURE) == 24
|
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)
|
entry = registry.async_get(entity_id)
|
||||||
assert entry
|
assert entry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user