Skip to content

Commit

Permalink
Merge pull request #208 from dvd-dev/issue466
Browse files Browse the repository at this point in the history
Fix pour les problèmes de min/max de thermostats
  • Loading branch information
ic-dev21 authored Oct 4, 2024
2 parents 0d5d83c + 23e6e38 commit dd35cdd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 David Vallee Delisle
Copyright (c) 2020-2024 David Vallee Delisle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 10 additions & 2 deletions pyhilo/device/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@ def target_temperature(self) -> float:

@property
def max_temp(self) -> float:
return cast(float, self.get_value("max_temp_setpoint", 0))
value = self.get_value("max_temp_setpoint", 30)

if value is None or value == 0:
return 36.0
return float(value)

@property
def min_temp(self) -> float:
return cast(float, self.get_value("min_temp_setpoint", 0))
value = self.get_value("min_temp_setpoint", 5)

if value is None or value == 0:
return 5.0
return float(value)

@property
def hvac_action(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exclude = ".venv/.*"

[tool.poetry]
name = "python-hilo"
version = "2024.6.1"
version = "2024.10.1"
description = "A Python3, async interface to the Hilo API"
readme = "README.md"
authors = ["David Vallee Delisle <[email protected]>"]
Expand Down

0 comments on commit dd35cdd

Please sign in to comment.