55import datetime
66import json
77import logging
8- from typing import Any , Callable , Optional
8+ from typing import Any , Callable
99
1010import aiohttp # type: ignore
1111from aiohttp .client_exceptions import ContentTypeError , ServerTimeoutError
@@ -181,8 +181,8 @@ def __init__(self, host: str, user: str = None, pwd: str = None) -> None:
181181 self ._config : dict = {}
182182 self ._override = None
183183 self ._ws_listening = False
184- self .websocket : Optional [ OpenEVSEWebsocket ] = None
185- self .callback : Optional [ Callable ] = None
184+ self .websocket : OpenEVSEWebsocket | None = None
185+ self .callback : Callable | None = None
186186 self ._loop = None
187187
188188 async def process_request (
@@ -406,7 +406,7 @@ async def get_override(self) -> None:
406406 """Get the manual override status."""
407407 url = f"{ self .url } override"
408408
409- _LOGGER .debug ("Geting data from %s" , url )
409+ _LOGGER .debug ("Getting data from %s" , url )
410410 response = await self .process_request (url = url , method = "get" )
411411 return response
412412
@@ -465,9 +465,9 @@ async def toggle_override(self) -> None:
465465
466466 async def clear_override (self ) -> None :
467467 """Clear the manual override status."""
468- url = f"{ self .url } overrride "
468+ url = f"{ self .url } override "
469469
470- _LOGGER .debug ("Clearing manual overrride %s" , url )
470+ _LOGGER .debug ("Clearing manual override %s" , url )
471471 response = await self .process_request (url = url , method = "delete" )
472472 _LOGGER .debug ("Toggle response: %s" , response ["msg" ])
473473
@@ -668,7 +668,7 @@ def usage_total(self) -> float:
668668
669669 @property
670670 def ambient_temperature (self ) -> float | None :
671- """Return the temperature of the ambient sensor, in degrees Celcius ."""
671+ """Return the temperature of the ambient sensor, in degrees Celsius ."""
672672 assert self ._status is not None
673673 temp = None
674674 if "temp" in self ._status and self ._status ["temp" ]:
@@ -681,7 +681,7 @@ def ambient_temperature(self) -> float | None:
681681 def rtc_temperature (self ) -> float | None :
682682 """Return the temperature of the real time clock sensor.
683683
684- In degrees Celcius .
684+ In degrees Celsius .
685685 """
686686 assert self ._status is not None
687687 temp = self ._status ["temp2" ] if self ._status ["temp2" ] else None
@@ -693,7 +693,7 @@ def rtc_temperature(self) -> float | None:
693693 def ir_temperature (self ) -> float | None :
694694 """Return the temperature of the IR remote sensor.
695695
696- In degrees Celcius .
696+ In degrees Celsius .
697697 """
698698 assert self ._status is not None
699699 temp = self ._status ["temp3" ] if self ._status ["temp3" ] else None
@@ -703,7 +703,7 @@ def ir_temperature(self) -> float | None:
703703
704704 @property
705705 def esp_temperature (self ) -> float | None :
706- """Return the temperature of the ESP sensor, in degrees Celcius ."""
706+ """Return the temperature of the ESP sensor, in degrees Celsius ."""
707707 assert self ._status is not None
708708 if "temp4" in self ._status :
709709 temp = self ._status ["temp4" ] if self ._status ["temp4" ] else None
@@ -712,7 +712,7 @@ def esp_temperature(self) -> float | None:
712712 return None
713713
714714 @property
715- def time (self ) -> Optional [ datetime .datetime ] :
715+ def time (self ) -> datetime .datetime | None :
716716 """Get the RTC time."""
717717 assert self ._status is not None
718718 if "time" in self ._status :
0 commit comments