Skip to content

Add WhiteLamp SmartCam module for outdoor cameras (e.g. C325WB)#1713

Open
ijardillier wants to merge 2 commits into
python-kasa:masterfrom
ijardillier:add-smartcam-whitelamp
Open

Add WhiteLamp SmartCam module for outdoor cameras (e.g. C325WB)#1713
ijardillier wants to merge 2 commits into
python-kasa:masterfrom
ijardillier:add-smartcam-whitelamp

Conversation

@ijardillier

Copy link
Copy Markdown

New WhiteLamp module under kasa/smartcam/modules/

  • Exposes white_lamp_state (on/off toggle via reverseWhitelampStatus) and white_lamp_brightness (1-100, only if device supports it)
  • Adds Module.SmartCamWhiteLamp and Module.WhiteLamp module names
  • Adds fixture for C325WB(EU) 1.0 / 1.4.4
  • Adds unit tests in tests/smartcam/modules/test_whitelamp.py
  • Fixes fake protocol to handle reverseWhitelampStatus toggle command

Pre-commit OK
Tests : OK

Also tested with python-kasa CLI and my own Home Assistant instance with 2 C325WB cameras.

Hope all is compliant with your guidelines and nothing missing.

- New WhiteLamp module under kasa/smartcam/modules/
- Exposes white_lamp_state (on/off toggle via reverseWhitelampStatus)
  and white_lamp_brightness (1-100, only if device supports it)
- Adds Module.SmartCamWhiteLamp and Module.WhiteLamp module names
- Adds fixture for C325WB(EU) 1.0 / 1.4.4
- Adds unit tests in tests/smartcam/modules/test_whitelamp.py
- Fixes fake protocol to handle reverseWhitelampStatus toggle command
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.43568% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.24%. Comparing base (76d9f68) to head (2c10b1e).

Files with missing lines Patch % Lines
kasa/smartcam/smartcammodule.py 88.67% 3 Missing and 3 partials ⚠️
kasa/module.py 96.87% 1 Missing and 3 partials ⚠️
kasa/smartcam/modules/whitelamp.py 97.22% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1713      +/-   ##
==========================================
+ Coverage   93.22%   93.24%   +0.01%     
==========================================
  Files         157      158       +1     
  Lines        9815     9854      +39     
  Branches     1003     1005       +2     
==========================================
+ Hits         9150     9188      +38     
  Misses        472      472              
- Partials      193      194       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

  to match the class name used as key in dev.modules
- Add SmartCamModule.SmartCamWhiteLamp assertion in test_whitelamp_is_on
- Add test_whitelamp_no_brightness to cover the case where brightness
  is not supported by the device"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant