Skip to content

Conversation

@sameer
Copy link

@sameer sameer commented Jan 2, 2026

Hello 👋

I'm adding floodlight control for the Tapo C720 and am looking for some feedback on my approach. Since it's a smart camera, I added floodlight control as a module -- does this make sense?

I tested and can confirm that the floodlight is controllable with the dev tool ( feature floodlight_state True). Will add tests for this PR if the way it's written looks good.

@ZeliardM
Copy link
Contributor

ZeliardM commented Jan 2, 2026

@sameer As someone else who has been submitting requests, one thing to do for your environment, run:
uv sync --all-extras

Then for commits and testing, make sure to run:
uv run pre-commit run -a

And:
uv run pytest -n auto --cov kasa --cov-report xml

These will check all of the test coverages and commit testing to make sure that everything works out.

Another thing I would do is pull in a fixture file for the camera with the floodlight pieces on it so that all the tests work there too, run:
source .venv/bin/activate

And then:
python -m devtools.dump_devinfo --username 'username' --password 'password' --host IP_ADDRESS

Those commands will help make sure that things you're running, adding, and changing, don't break things for existing code as well. It will also help make sure that all of the checks pass for the PR and that code looks good and follows existing guidelines.

@sameer
Copy link
Author

sameer commented Jan 2, 2026

Will do, thanks!

@sameer As someone else who has been submitting requests, one thing to do for your environment, run:
uv sync --all-extras

Then for commits and testing, make sure to run:
uv run pre-commit run -a

And:
uv run pytest -n auto --cov kasa --cov-report xml

These will check all of the test coverages and commit testing to make sure that everything works out.

Another thing I would do is pull in a fixture file for the camera with the floodlight pieces on it so that all the tests work there too, run:
source .venv/bin/activate

And then:
python -m devtools.dump_devinfo --username 'username' --password 'password' --host IP_ADDRESS

Those commands will help make sure that things you're running, adding, and changing, don't break things for existing code as well. It will also help make sure that all of the checks pass for the PR and that code looks good and follows existing guidelines.

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.

2 participants