mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 03:33:35 +00:00
f9b5003da2
* Add support for tapo light bulbs * Use TapoDevice for on/off * Add tapobulbs to discovery * Add partial support for effects Activating the effect does not work as I thought it would, but this implements rest of the interface from SmartLightStrip. * Add missing __init__ for tapo package * Make mypy happy * Add docstrings to make ruff happy * Implement state_information and has_emeter * Import tapoplug from kasa.tapo package * Add tapo L530 fixture * Enable tests for L530 fixture * Make ruff happy * Update fixture filename * Raise exceptions on invalid parameters * Return results in a wrapped dict * Implement set_* * Reorganize bulbs to iot&smart, fix tests for smarts * Fix linting * Fix BULBS_LIGHT_STRIP back to LIGHT_STRIPS
34 lines
678 B
Python
34 lines
678 B
Python
"""Script that checks if README.md is missing devices that have fixtures."""
|
|
from kasa.tests.conftest import (
|
|
ALL_DEVICES,
|
|
BULBS,
|
|
DIMMERS,
|
|
LIGHT_STRIPS,
|
|
PLUGS,
|
|
STRIPS,
|
|
)
|
|
|
|
with open("README.md") as f:
|
|
readme = f.read()
|
|
|
|
typemap = {
|
|
"light strips": LIGHT_STRIPS,
|
|
"bulbs": BULBS,
|
|
"plugs": PLUGS,
|
|
"strips": STRIPS,
|
|
"dimmers": DIMMERS,
|
|
}
|
|
|
|
|
|
def _get_device_type(dev, typemap):
|
|
for typename, devs in typemap.items():
|
|
if dev in devs:
|
|
return typename
|
|
else:
|
|
return "Unknown type"
|
|
|
|
|
|
for dev in ALL_DEVICES:
|
|
if dev not in readme:
|
|
print(f"{dev} not listed in {_get_device_type(dev, typemap)}")
|