Skip to content

Commit

Permalink
fix bugs and add more plug types
Browse files Browse the repository at this point in the history
  • Loading branch information
functionpointer committed Oct 2, 2022
1 parent ba55ef1 commit ebaa49d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/chargecloudapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
class Api:
"""Class to make authenticated requests."""

def __init__(self, websession: ClientSession, base_url: str = DEFAULT_URL):
def __init__(self, websession: ClientSession, base_url: str | None = None):
"""Initialize the auth."""
self.websession = websession
self.base_url = URL(base_url)
self.base_url = URL(base_url or DEFAULT_URL)
self.logger = logging.getLogger("chargecloudapi")

async def location_by_evse_id(self, evse_id: str, **kwargs) -> list[Location]:
Expand Down
2 changes: 1 addition & 1 deletion src/chargecloudapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Coordinates(BaseModel):
class Connector(BaseModel):
id: int
status: Status
standard: Literal["IEC_62196_T2", "IEC_62196_T2_COMBO", "DOMESTIC_F"]
standard: Literal["IEC_62196_T2", "IEC_62196_T2_COMBO", "DOMESTIC_F", "CHADEMO", "TESLA"]
format: Literal["CABLE", "SOCKET"]
power_type: Literal["AC_1_PHASE", "AC_3_PHASE", "DC"]
ampere: float
Expand Down
1 change: 1 addition & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ async def main():
"DE*ERE*E0008*OMN15L",
"DE*UFC*E210004",
"DE*ION*E207101",
"DE*EDR*E11000150*2",
]

for evse_id in evse_ids:
Expand Down

0 comments on commit ebaa49d

Please sign in to comment.