Skip to content

Commit

Permalink
Merge pull request #5 from videojedi/main
Browse files Browse the repository at this point in the history
add zappi unlock command
  • Loading branch information
CJNE authored Mar 20, 2023
2 parents ab381e4 + a071b12 commit d198aeb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#myenergi
.myenergi.cfg

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
1 change: 1 addition & 0 deletions pymyenergi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def cli():
"smart-boost",
"mingreen",
"priority",
"unlock",
],
)
subparser_zappi.add_argument("arg", nargs="*")
Expand Down
5 changes: 5 additions & 0 deletions pymyenergi/zappi.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,8 @@ async def start_smart_boost(self, amount, complete_by):
f"/cgi-zappi-mode-Z{self._serialno}-0-11-{int(amount)}-{time}"
)
return True

async def unlock(self):
"""Unlock"""
await self._connection.get(f"/cgi-jlock-Z{self._serialno}-00000010")
return True

0 comments on commit d198aeb

Please sign in to comment.