Skip to content

Commit

Permalink
Merge pull request #30 from PimDoos/dev
Browse files Browse the repository at this point in the history
Add dynamic/schedule API endpoint
  • Loading branch information
PimDoos committed Mar 18, 2024
2 parents 6fe4cf5 + 55ba65e commit c314199
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sessypy/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

class SessyApiCommand(str, Enum):
CT_DETAILS = f"{API_VERSION_1}/ct/details"
DYNAMIC_SCHEDULE = f"{API_VERSION_2}/dynamic/schedule"

METER_GRID_TARGET = f"{API_VERSION_1}/meter/grid_target"

NETWORK_SCAN = f"{API_VERSION_1}/network/scan"
Expand Down
3 changes: 3 additions & 0 deletions src/sessypy/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ async def close(self):
await self.api.close()

class SessyBattery(SessyDevice):
async def get_dynamic_schedule(self):
return await self.api.get(SessyApiCommand.DYNAMIC_SCHEDULE)

async def get_power_status(self):
return await self.api.get(SessyApiCommand.POWER_STATUS)

Expand Down

0 comments on commit c314199

Please sign in to comment.