|
2 | 2 | from __future__ import annotations
|
3 | 3 | import time
|
4 | 4 | import asyncio
|
5 |
| -from datetime import datetime, timezone |
| 5 | +from datetime import datetime |
6 | 6 |
|
7 | 7 | from asyncio import Task
|
8 | 8 | from typing import Any
|
@@ -150,7 +150,7 @@ async def _send_cloud_command(
|
150 | 150 | 422 Invalid Parameter (invalid command id or command value)
|
151 | 151 | """
|
152 | 152 | if response.status == 204:
|
153 |
| - self.last_send = datetime.now(timezone.utc) |
| 153 | + self.last_send = datetime.now() |
154 | 154 | return
|
155 | 155 | # elif (
|
156 | 156 | # response.status == 403
|
@@ -200,11 +200,11 @@ async def long_poll(self, fireplace: IntelliFireFireplaceCloud) -> bool:
|
200 | 200 | self._log.debug("Long Poll Status Code %d", response.status)
|
201 | 201 | if response.status == 200:
|
202 | 202 | self._log.debug("Long poll: 200 - Received data")
|
203 |
| - self.last_long_poll = datetime.now(timezone.utc) |
| 203 | + self.last_long_poll = datetime.now() |
204 | 204 | return True
|
205 | 205 | elif response.status == 408:
|
206 | 206 | 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() |
208 | 208 | return False
|
209 | 209 | elif response.status == 403:
|
210 | 210 | raise CloudError("Not authorized")
|
@@ -278,7 +278,7 @@ async def poll(self, timeout_seconds: float = 10.0) -> None:
|
278 | 278 | self._data = IntelliFirePollData(**json_data)
|
279 | 279 | self._log.debug(f"poll() complete: {self._data}")
|
280 | 280 |
|
281 |
| - self.last_poll = datetime.now(timezone.utc) |
| 281 | + self.last_poll = datetime.now() |
282 | 282 |
|
283 | 283 | except aiohttp.ClientResponseError as e:
|
284 | 284 | if e.status == 403:
|
|
0 commit comments