Skip to content

Commit c532078

Browse files
committed
2 parents 4696087 + 84159d7 commit c532078

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/stale.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Mark Stale Issues
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v3
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had activity in 14 days. It will be closed if no further activity occurs in 7 days'
14+
days-before-stale: 14
15+
days-before-close: 7
16+
stale-issue-label: 'stale'
17+
days-before-issue-stale: 14
18+
days-before-pr-stale: -1
19+
days-before-issue-close: 7
20+
days-before-pr-close: -1
21+
exempt-issue-labels: 'bug,enhancement'

octoprint_tplinksmartplug/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ def get_api_commands(self):
510510
getEnergyData=["ip"],
511511
enableAutomaticShutdown=[],
512512
disableAutomaticShutdown=[],
513-
abortAutomaticShutdown=[])
513+
abortAutomaticShutdown=[],
514+
getListPlug=[])
514515

515516
def on_api_get(self, request):
516517
self._tplinksmartplug_logger.debug(request.args)
@@ -567,6 +568,8 @@ def on_api_command(self, command, data):
567568
self._tplinksmartplug_logger.debug("Power off aborted.")
568569
self._tplinksmartplug_logger.debug("Restarting idle timer.")
569570
self._reset_idle_timer()
571+
elif command == "getListPlug":
572+
return json.dumps(self._settings.get(["arrSmartplugs"]))
570573
else:
571574
response = dict(ip=data.ip, currentState="unknown")
572575
if command == "enableAutomaticShutdown" or command == "disableAutomaticShutdown":

0 commit comments

Comments
 (0)