1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #786] [MERGED] Feature/multiple switches per prtinter #1119

Closed
opened 2026-05-07 00:16:07 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/786
Author: @ManuelW77
Created: 3/22/2026
Status: Merged
Merged: 3/23/2026
Merged by: @maziggy

Base: devHead: feature/multiple-switches-per-prtinter


📝 Commits (8)

  • e0a4987 [Feature] Add endpoint and client method to retrieve all smart plugs by printer
  • 0751071 [Fix] Update power on/off messages for clarity in German and English translations
  • d665ee5 Merge multiple switches to branch
  • c3a3739 Update power control terminology in localization files
  • 48ae915 feat(printer-card): add type-aware rendering for HA scripts
  • 8430501 fix(pr-review): address all remaining blockers and minor issues
  • 3efd3bd Merge branch 'dev' into feature/multiple-switches-per-prtinter
  • 88a42d1 Remove duplicate query invalidation for printer_id

📊 Changes

12 files changed (+185 additions, -188 deletions)

View changed files

📝 backend/app/api/routes/smart_plugs.py (+17 -0)
📝 frontend/src/api/client.ts (+1 -0)
📝 frontend/src/components/AddSmartPlugModal.tsx (+2 -2)
📝 frontend/src/components/SmartPlugCard.tsx (+2 -3)
📝 frontend/src/i18n/locales/de.ts (+5 -5)
📝 frontend/src/i18n/locales/en.ts (+5 -5)
📝 frontend/src/i18n/locales/fr.ts (+3 -3)
📝 frontend/src/i18n/locales/it.ts (+3 -3)
📝 frontend/src/i18n/locales/ja.ts (+5 -5)
📝 frontend/src/i18n/locales/pt-BR.ts (+5 -5)
📝 frontend/src/i18n/locales/zh-CN.ts (+6 -6)
📝 frontend/src/pages/PrintersPage.tsx (+131 -151)

📄 Description

Description

Have more than one switch at the printer card, because of heater or something else.
Adds other switches as a new line below.

https://github.com/maziggy/bambuddy/issues/713

Fixes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

Backend
backend/app/api/routes/smart_plugs.py — +11 Zeilen

Neuer Endpoint GET /smart-plugs/by-printer/{printer_id}/all
Gibt alle Smartswitches eines Druckers als Array zurück (kein Filter)
Auth-geschützt via SMART_PLUGS_READ Permission
Frontend API
frontend/src/api/client.ts — +1 Zeile

Neue Methode getAllSmartPlugsByPrinter(printerId) → SmartPlug[]

Screenshots

SCR-20260322-lyod

Testing

  • I have tested this on my local machine
  • I have tested with my printer model:

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/786 **Author:** [@ManuelW77](https://github.com/ManuelW77) **Created:** 3/22/2026 **Status:** ✅ Merged **Merged:** 3/23/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `dev` ← **Head:** `feature/multiple-switches-per-prtinter` --- ### 📝 Commits (8) - [`e0a4987`](https://github.com/maziggy/bambuddy/commit/e0a49873e1d8b02337db99852de0c212f7a7afe5) [Feature] Add endpoint and client method to retrieve all smart plugs by printer - [`0751071`](https://github.com/maziggy/bambuddy/commit/07510713621da0ca2734674b8b63b6efb983eea8) [Fix] Update power on/off messages for clarity in German and English translations - [`d665ee5`](https://github.com/maziggy/bambuddy/commit/d665ee5640c950acd530fb8650d558467de37eb5) Merge multiple switches to branch - [`c3a3739`](https://github.com/maziggy/bambuddy/commit/c3a373915d0ea3a7f4db558315a66382369a54df) Update power control terminology in localization files - [`48ae915`](https://github.com/maziggy/bambuddy/commit/48ae91500cf3177172f1169468ac00e4f515a8dd) feat(printer-card): add type-aware rendering for HA scripts - [`8430501`](https://github.com/maziggy/bambuddy/commit/8430501a5b54758043af8b99ea091d9ece758bc4) fix(pr-review): address all remaining blockers and minor issues - [`3efd3bd`](https://github.com/maziggy/bambuddy/commit/3efd3bd4d20f626dd5edd988ee1a1782896d9da6) Merge branch 'dev' into feature/multiple-switches-per-prtinter - [`88a42d1`](https://github.com/maziggy/bambuddy/commit/88a42d1756b5d5f83cffccdd2854b9c8c7fccae3) Remove duplicate query invalidation for printer_id ### 📊 Changes **12 files changed** (+185 additions, -188 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/smart_plugs.py` (+17 -0) 📝 `frontend/src/api/client.ts` (+1 -0) 📝 `frontend/src/components/AddSmartPlugModal.tsx` (+2 -2) 📝 `frontend/src/components/SmartPlugCard.tsx` (+2 -3) 📝 `frontend/src/i18n/locales/de.ts` (+5 -5) 📝 `frontend/src/i18n/locales/en.ts` (+5 -5) 📝 `frontend/src/i18n/locales/fr.ts` (+3 -3) 📝 `frontend/src/i18n/locales/it.ts` (+3 -3) 📝 `frontend/src/i18n/locales/ja.ts` (+5 -5) 📝 `frontend/src/i18n/locales/pt-BR.ts` (+5 -5) 📝 `frontend/src/i18n/locales/zh-CN.ts` (+6 -6) 📝 `frontend/src/pages/PrintersPage.tsx` (+131 -151) </details> ### 📄 Description ## Description Have more than one switch at the printer card, because of heater or something else. Adds other switches as a new line below. ## Related Issue https://github.com/maziggy/bambuddy/issues/713 Fixes # ## Type of Change <!-- Mark the relevant option with an "x" --> - [ ] Bug fix (non-breaking change that fixes an issue) - [X] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made Backend backend/app/api/routes/smart_plugs.py — +11 Zeilen Neuer Endpoint GET /smart-plugs/by-printer/{printer_id}/all Gibt alle Smartswitches eines Druckers als Array zurück (kein Filter) Auth-geschützt via SMART_PLUGS_READ Permission Frontend API frontend/src/api/client.ts — +1 Zeile Neue Methode getAllSmartPlugsByPrinter(printerId) → SmartPlug[] ## Screenshots <img width="647" height="281" alt="SCR-20260322-lyod" src="https://github.com/user-attachments/assets/04108822-0f1f-452e-bb96-9456f90eaf2a" /> ## Testing <!-- Describe how you tested your changes --> - [X] I have tested this on my local machine - [X] I have tested with my printer model: <!-- e.g., X1C, P1S, A1 --> ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes <!-- Add any additional information that reviewers should know --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:16:07 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1119
No description provided.