Skip to content

Commit

Permalink
Merge pull request #29 from piotrbulinski/fireplace-mode-improvements
Browse files Browse the repository at this point in the history
Fireplace mode improvements.
  • Loading branch information
piotrbulinski authored Feb 6, 2025
2 parents 84322dc + a9c5928 commit a1f7f6c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async def main():
print(f"Air temp. setpoint Home: {device.air_temp_setpoint_home} °C")
print(f"Cooker-hood status: {device.cooker_hood_status}")
print(f"Fireplace status: {device.fireplace_ventilation_status}")
print(f"Fireplace mode runtime: {device.fireplace_mode_runtime} minutes")
print(
f"Fireplace duration remaining: {device.fireplace_ventilation_remaining_duration} minutes"
)
Expand Down
18 changes: 17 additions & 1 deletion flexit_bacnet/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,27 @@ async def set_air_temp_setpoint_home(self, temperature: float) -> None:
await self._set_value(AIR_TEMP_SETPOINT_HOME, temperature)

async def start_fireplace_ventilation(self, minutes: int) -> None:
"""Trigger temporary fireplace ventilation mode.
"""Set duration and trigger fireplace ventilation mode.
minutes -- duration of fireplace ventilation in minutes (1 - 360)
"""
await self.set_fireplace_mode_runtime(minutes)
await self.trigger_fireplace_mode()

async def set_fireplace_mode_runtime(self, minutes: int) -> None:
"""Set runtime duration for the fireplace ventilation mode.
minutes -- duration of fireplace ventilation in minutes (1 - 360)
"""
await self._set_value(FIREPLACE_VENTILATION_RUNTIME, minutes)

@property
def fireplace_mode_runtime(self) -> int:
"""Returns currently set runtime for the fireplace mode (in minutes)."""
return self._get_value(FIREPLACE_VENTILATION_RUNTIME)

async def trigger_fireplace_mode(self) -> None:
"""Trigger temporary fireplace ventilation mode."""
await self._set_value(FIREPLACE_VENTILATION, FIREPLACE_VENTILATION_TRIGGER)

@property
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "flexit_bacnet"
version = "2.2.2"
version = "2.2.3"
authors = [
{ name="Piotr Buliński" },
]
Expand Down

0 comments on commit a1f7f6c

Please sign in to comment.