aiocomfoconnect 0.4.5__tar.gz → 0.4.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiocomfoconnect
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: aiocomfoconnect is an asyncio Python 3 library for communicating with a Zehnder ComfoAir Q350/450/600 ventilation system
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -537,10 +537,13 @@ class ComfoConnect(Bridge):
537
537
  async def set_property(self, prop: Property, value: int | float | str, node_id: Optional[int] = None) -> Any:
538
538
  """Set a property on the node it lives on (or node_id), encoded for its type.
539
539
 
540
- A property with options takes an option, a scaled property takes the scaled value.
540
+ A property with options takes an option, a scaled property takes the scaled value. A numeric value is rounded to
541
+ the whole number the unit stores, so a float like 90.0 is fine for a property without a scale too.
541
542
  """
542
543
  if prop.scale is not None:
543
544
  value = round(value / prop.scale)
545
+ elif prop.options is None and prop.property_type in NUMERIC_PROPERTY_TYPES:
546
+ value = round(value)
544
547
  if prop.options is not None:
545
548
  values = {option: raw for raw, option in prop.options.items()}
546
549
  if value not in values:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "aiocomfoconnect"
3
- version = "0.4.5"
3
+ version = "0.4.6"
4
4
  description = "aiocomfoconnect is an asyncio Python 3 library for communicating with a Zehnder ComfoAir Q350/450/600 ventilation system"
5
5
  authors = ["Michaël Arnauts <michael.arnauts@gmail.com>"]
6
6
  license = "MIT"
File without changes