Skip to content

Commit 2d224db

Browse files
committed
removed timezone
1 parent 9b01835 commit 2d224db

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "intellifire4py"
3-
version = "4.1.6"
3+
version = "4.1.7"
44
description = "Intellifire4Py"
55
authors = ["Jeff Stein <[email protected]>"]
66
license = "MIT"

src/intellifire4py/cloud_api.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from __future__ import annotations
33
import time
44
import asyncio
5-
from datetime import datetime, timezone
5+
from datetime import datetime
66

77
from asyncio import Task
88
from typing import Any
@@ -150,7 +150,7 @@ async def _send_cloud_command(
150150
422 Invalid Parameter (invalid command id or command value)
151151
"""
152152
if response.status == 204:
153-
self.last_send = datetime.now(timezone.utc)
153+
self.last_send = datetime.now()
154154
return
155155
# elif (
156156
# response.status == 403
@@ -200,11 +200,11 @@ async def long_poll(self, fireplace: IntelliFireFireplaceCloud) -> bool:
200200
self._log.debug("Long Poll Status Code %d", response.status)
201201
if response.status == 200:
202202
self._log.debug("Long poll: 200 - Received data")
203-
self.last_long_poll = datetime.now(timezone.utc)
203+
self.last_long_poll = datetime.now()
204204
return True
205205
elif response.status == 408:
206206
self._log.debug("Long poll: 408 - No Data changed")
207-
self.last_long_poll = datetime.now(timezone.utc)
207+
self.last_long_poll = datetime.now()
208208
return False
209209
elif response.status == 403:
210210
raise CloudError("Not authorized")
@@ -278,7 +278,7 @@ async def poll(self, timeout_seconds: float = 10.0) -> None:
278278
self._data = IntelliFirePollData(**json_data)
279279
self._log.debug(f"poll() complete: {self._data}")
280280

281-
self.last_poll = datetime.now(timezone.utc)
281+
self.last_poll = datetime.now()
282282

283283
except aiohttp.ClientResponseError as e:
284284
if e.status == 403:

src/intellifire4py/local_api.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from .utils import _range_check
2222
import aiohttp
2323

24-
from datetime import datetime, timezone
24+
from datetime import datetime
2525

2626

2727
class IntelliFireAPILocal(IntelliFireController, IntelliFireDataProvider):
@@ -205,7 +205,7 @@ async def poll(
205205
json_data = await response.json(content_type=None)
206206
self._data = IntelliFirePollData(**json_data)
207207
self._log.debug(f"poll() complete: {self._data}")
208-
self.last_poll = datetime.now(timezone.utc)
208+
self.last_poll = datetime.now()
209209
except JSONDecodeError as error:
210210
if not suppress_warnings:
211211
self._log.warning("Error decoding JSON: [%s]", response.text)
@@ -339,7 +339,7 @@ async def _send_local_command(
339339
self._log.debug(
340340
"_send_local_command:: Response Code [%d]", resp.status
341341
)
342-
self.last_send = datetime.now(timezone.utc)
342+
self.last_send = datetime.now()
343343
except asyncio.TimeoutError as error:
344344
self._log.warning("Control Endpoint Timeout Error %s", error)
345345
continue

0 commit comments

Comments
 (0)