Skip to content

Commit

Permalink
Update README and rev version (#16)
Browse files Browse the repository at this point in the history
* Update README and rev version

* Update README and example
  • Loading branch information
mattrayner authored Apr 8, 2024
1 parent d00525b commit 82d2c47
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Add `Pod.offering_energy` - @mattrayner
* Add `Pod.last_message_at` - @mattrayner
* Add `Pod.charging_state` - @mattrayner
* Add `SUSPENDED_EV` to Pod state Enums - @mattrayner

## v1.5.0

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Method | Description
`async_get_charges(perpage=5, page=2)` | *Get charges for a user* - Returns a list of `Charge` objects. `perpage` can be 'all', or a number. Can get additional pages with `page` attribute.
`async_get_firmware(pod=_Pod_)` | *Get firmware information for a pod* - Returns a list of `Firmware` objects.
`async_get_user(includes=[])` | *Get current user account information* - Returns a `User` object including account balance, units and vehicles. `includes` is a list of additional information pulled for a User. Pass an empty list to `includes` for minimal information or `None` for full data (defaults to `None`)
`async_get_charge_override(pod=_Pod_)` | *Get the current charge override for a pod* - Returns a `ChargeOverride` object.
`async_set_charge_override(pod=_Pod_, enabled=False, start_time=None, end_time=None)` | *Set a charge override for a pod* - Returns a `ChargeOverride` object.
`async_delete_charge_override(pod=_Pod_)` | *Delete a charge override for a pod* - Returns a boolean.
`async_set_charge_mode_manual(pod=_Pod_)` | *Set a pod to manual charge mode* - Returns a `Pod` object.
`async_set_charge_mode_smart(pod=_Pod_)` | *Set a pod to smart charge mode* - Returns a `Pod` object.
`async_get_charge_mode(pod=_Pod_)` | *Get the current charge mode for a pod* - Returns a `ChargeMode` object.
`async_get_connection_status(pod=_Pod_)` | *Get the current connection status for a pod* - Returns a `ConnectionStatus` object.

### Example

Expand Down
8 changes: 7 additions & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ async def main(username: str, password: str, http_debug: bool = False, loop=None
override = await client.async_set_charge_override(pod=pod, hours=1)
print(f" Override until: {override.ends_at}")

# Get charge override
print(f"Attempting to get charge override for pod {pod.ppid}")
override = await client.async_get_charge_override(pod=pod)
print(f" Override ends at: {override.ends_at}")

# Delete override
print(f"Deleting 'Charge now' for pod {pod.ppid}")
await client.async_delete_charge_override(pod=pod)
Expand All @@ -76,7 +81,8 @@ async def main(username: str, password: str, http_debug: bool = False, loop=None
# Get charge override
print(f"Attempting to get charge override for pod {pod.ppid}")
override = await client.async_get_charge_override(pod=pod)
print(f" Override ends at: {override.ends_at}")
print(f" Override removed: {override is None}")


# Get connectivity status
print(f"Getting connectivity status for pod {pod.ppid}")
Expand Down
2 changes: 1 addition & 1 deletion podpointclient/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version for the podpointclient library"""

__version__ = "1.6.0a4"
__version__ = "1.6.0"

0 comments on commit 82d2c47

Please sign in to comment.