Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ jobs:
pip install -e .
pip install pytest
pip install pytest-asyncio
pip install pytz
- name: Run pytest
run: python -m pytest tests/
5 changes: 2 additions & 3 deletions lennoxs30api/metrics.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Communication Metrics for communication to lennox controller"""
# pylint: disable=invalid-name

from datetime import datetime
import pytz
from datetime import UTC, datetime


class Metrics:
Expand Down Expand Up @@ -56,7 +55,7 @@ def reset(self) -> None:

def now(self) -> datetime:
"""Returns the localized datetime"""
return pytz.utc.localize(datetime.utcnow())
return datetime.now(UTC)

def getMetricList(self) -> dict[str, any]:
"""Return metric list as dict"""
Expand Down
Loading