mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#1056
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maziggy/bambuddy/pull/476
Author: @Percy2Live
Created: 2/20/2026
Status: ❌ Closed
Base:
0.2.1← Head:patch-1📝 Commits (10+)
1d0875ebuild(deps): bump aquasecurity/trivy-action5bcfadbMerge pull request #437 from maziggy/dependabot/github_actions/dot-github/workflows/github_actions-9bddd90c5810cae70Updated CI971aa96build(deps): bump aquasecurity/trivy-action0a725c0Merge pull request #440 from maziggy/dependabot/github_actions/dot-github/workflows/github_actions-9bddd90c58a361671Updated CI036ae16Updated CI2c0d1c2Updated CI5d48ab8Updated CI802bfe3Updated CI📊 Changes
10 files changed (+494 additions, -1985 deletions)
View changed files
📝
.github/workflows/ci.yml(+13 -6)📝
.github/workflows/security.yml(+150 -33)📝
backend/app/api/routes/smart_plugs.py(+30 -0)📝
backend/app/core/database.py(+26 -0)📝
backend/app/models/smart_plug.py(+11 -2)📝
backend/app/schemas/smart_plug.py(+22 -2)➕
backend/app/services/rest_plug.py(+203 -0)📝
backend/app/services/smart_plug_manager.py(+39 -0)📝
frontend/package-lock.json(+0 -1940)📝
frontend/package.json(+0 -2)📄 Description
Description
Implements Option 2 from issue #472: a new
plug_type = "rest"that allows users to connect any smart plug via custom REST API URLs.How it works
The user configures up to four URLs for their smart plug:
The HTTP method (GET or POST) is configurable per plug. For state detection, users can optionally specify a substring (
rest_state_on_value) that, when present in the status response body, indicates the plug is ON.Example use cases
http://192.168.1.50/relay/0?turn=onhttp://192.168.1.51/api/onChanged files
backend/app/services/rest_plug.pyRestPlugServicewithturn_on,turn_off,toggle,get_status,get_energy,test_connectionbackend/app/models/smart_plug.pyrest_on_url,rest_off_url,rest_toggle_url,rest_status_url,rest_method,rest_state_on_valuecolumnsbackend/app/schemas/smart_plug.pySmartPlugBaseandSmartPlugUpdate; updatedplug_typeLiteralbackend/app/services/smart_plug_manager.pyplug_type == "rest"torest_plug_servicebackend/app/api/routes/smart_plugs.pyrest_plug_service; routes REST in_get_service_for_plug; addsPOST /smart-plugs/rest/test-connectionendpointRelated Issue
Fixes #472
Type of Change
Checklist
TasmotaService/HomeAssistantService)smart_plugstable🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.