mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add hvac_action to flexit_bacnet climate entity (#110498)
* Add hvac_action to flexit_bacnet climate entity Also add extra state attributes * Remove extra state attrs * Change hvac action to heating
This commit is contained in:
parent
730fe760cf
commit
d44e389844
@ -15,6 +15,7 @@ from homeassistant.components.climate import (
|
|||||||
PRESET_HOME,
|
PRESET_HOME,
|
||||||
ClimateEntity,
|
ClimateEntity,
|
||||||
ClimateEntityFeature,
|
ClimateEntityFeature,
|
||||||
|
HVACAction,
|
||||||
HVACMode,
|
HVACMode,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -83,6 +84,13 @@ class FlexitClimateEntity(FlexitEntity, ClimateEntity):
|
|||||||
"""Refresh unit state."""
|
"""Refresh unit state."""
|
||||||
await self.device.update()
|
await self.device.update()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hvac_action(self) -> HVACAction | None:
|
||||||
|
"""Return current HVAC action."""
|
||||||
|
if self.device.electric_heater:
|
||||||
|
return HVACAction.HEATING
|
||||||
|
return HVACAction.FAN
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_temperature(self) -> float:
|
def current_temperature(self) -> float:
|
||||||
"""Return the current temperature."""
|
"""Return the current temperature."""
|
||||||
|
@ -60,6 +60,7 @@ def mock_flexit_bacnet() -> Generator[AsyncMock, None, None]:
|
|||||||
flexit_bacnet.heat_exchanger_efficiency = 81
|
flexit_bacnet.heat_exchanger_efficiency = 81
|
||||||
flexit_bacnet.heat_exchanger_speed = 100
|
flexit_bacnet.heat_exchanger_speed = 100
|
||||||
flexit_bacnet.air_filter_polluted = False
|
flexit_bacnet.air_filter_polluted = False
|
||||||
|
flexit_bacnet.air_filter_exchange_interval = 8784
|
||||||
flexit_bacnet.electric_heater = True
|
flexit_bacnet.electric_heater = True
|
||||||
|
|
||||||
# Mock fan setpoints
|
# Mock fan setpoints
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'current_temperature': 19.0,
|
'current_temperature': 19.0,
|
||||||
'friendly_name': 'Device Name',
|
'friendly_name': 'Device Name',
|
||||||
|
'hvac_action': <HVACAction.HEATING: 'heating'>,
|
||||||
'hvac_modes': list([
|
'hvac_modes': list([
|
||||||
<HVACMode.OFF: 'off'>,
|
<HVACMode.OFF: 'off'>,
|
||||||
<HVACMode.FAN_ONLY: 'fan_only'>,
|
<HVACMode.FAN_ONLY: 'fan_only'>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user