We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that the last_changed_seconds property of an entity always is 7200 wrong. My timezone is +02:00 so this has to be a timezone issue.
It looks like 'now' isn't in UTC: https://github.com/AppDaemon/appdaemon/blob/4.2.1/appdaemon/entity.py#L575
I debugged the values during a state change trigger:
The text was updated successfully, but these errors were encountered:
I use this a current workaround, it might help someone fixing it:
def _convert_to_seconds_ago(self, last_changed) -> float: utc = iso8601.parse_date(last_changed) now = datetime.datetime.now(datetime.timezone.utc) return (now - utc).total_seconds()
Sorry, something went wrong.
Thanks for reporting this @sander1988, we will look into it.
kind regards
This is fixed in 4.0.3
last_changed_seconds wrong due to timezone #1571
05fedba
No branches or pull requests
I noticed that the last_changed_seconds property of an entity always is 7200 wrong. My timezone is +02:00 so this has to be a timezone issue.
It looks like 'now' isn't in UTC: https://github.com/AppDaemon/appdaemon/blob/4.2.1/appdaemon/entity.py#L575
I debugged the values during a state change trigger:
The text was updated successfully, but these errors were encountered: