diff --git a/changelog.md b/changelog.md index 50ea10eb..1ef1a39c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# Version 2024.11.6 (2024-11-19) + +- Cleanup data point + # Version 2024.11.5 (2024-11-19) - Fix returned version of client diff --git a/hahomematic/const.py b/hahomematic/const.py index aa55197d..84dd1d0f 100644 --- a/hahomematic/const.py +++ b/hahomematic/const.py @@ -9,7 +9,7 @@ import re from typing import Any, Final, Required, TypedDict -VERSION: Final = "2024.11.5" +VERSION: Final = "2024.11.6" DEFAULT_CONNECTION_CHECKER_INTERVAL: Final = 15 # check if connection is available via rpc ping DEFAULT_CUSTOM_ID: Final = "custom_id" diff --git a/hahomematic/model/data_point.py b/hahomematic/model/data_point.py index e6bcb242..96079b90 100644 --- a/hahomematic/model/data_point.py +++ b/hahomematic/model/data_point.py @@ -159,6 +159,11 @@ def central(self) -> hmcu.CentralUnit: def full_name(self) -> str: """Return the full name of the data_point.""" + @property + def is_valid(self) -> bool: + """Return, if the value of the data_point is valid based on the refreshed at datetime.""" + return self._refreshed_at > INIT_DATETIME + @state_property def modified_at(self) -> datetime: """Return the last update datetime value.""" @@ -542,26 +547,11 @@ def is_readable(self) -> bool: """Return, if data_point is readable.""" return bool(self._operations & Operations.READ) - @property - def is_valid(self) -> bool: - """Return, if the value of the data_point is valid based on the refreshed at datetime.""" - return self._refreshed_at > INIT_DATETIME - @property def is_writeable(self) -> bool: """Return, if data_point is writeable.""" return False if self._is_forced_sensor else bool(self._operations & Operations.WRITE) - @state_property - def modified_at(self) -> datetime: - """Return the last modified datetime value.""" - return self._modified_at - - @state_property - def refreshed_at(self) -> datetime: - """Return the last refreshed datetime value.""" - return self._refreshed_at - @property def unconfirmed_last_value_send(self) -> ParameterT: """Return the unconfirmed value send for the data_point."""