mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Check README for supported models (#684)
* Check README for supported models * Use poetry for running due to imports * Update README
This commit is contained in:
parent
d5fdf05ed2
commit
c1f2f8fe67
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -47,6 +47,10 @@ jobs:
|
||||
- name: "Run check-ast"
|
||||
run: |
|
||||
poetry run pre-commit run check-ast --all-files
|
||||
- name: "Check README for supported models"
|
||||
run: |
|
||||
poetry run python -m devtools.check_readme_vs_fixtures
|
||||
|
||||
|
||||
tests:
|
||||
name: Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }}
|
||||
|
36
README.md
36
README.md
@ -215,7 +215,7 @@ Note, that this works currently only on kasa-branded devices which use port 9999
|
||||
In principle, most kasa-branded devices that are locally controllable using the official Kasa mobile app work with this library.
|
||||
|
||||
The following lists the devices that have been manually verified to work.
|
||||
**If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `devtools/dump_devinfo.py` to generate one).**
|
||||
**If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `python -m devtools.dump_devinfo` to generate one).**
|
||||
|
||||
### Plugs
|
||||
|
||||
@ -228,10 +228,10 @@ The following lists the devices that have been manually verified to work.
|
||||
* KP105
|
||||
* KP115
|
||||
* KP125
|
||||
* KP125M [See note below](#tapo-and-newer-kasa-branded-devices)
|
||||
* KP125M [See note below](#newer-kasa-branded-devices)
|
||||
* KP401
|
||||
* EP10
|
||||
* EP25 [See note below](#tapo-and-newer-kasa-branded-devices)
|
||||
* EP25 [See note below](#newer-kasa-branded-devices)
|
||||
|
||||
### Power Strips
|
||||
|
||||
@ -273,18 +273,29 @@ The following lists the devices that have been manually verified to work.
|
||||
* KL420L5
|
||||
* KL430
|
||||
|
||||
### Tapo and newer Kasa branded devices
|
||||
### Tapo branded devices
|
||||
|
||||
The library has recently added a limited supported for devices that carry Tapo branding.
|
||||
|
||||
At the moment, the following devices have been confirmed to work:
|
||||
|
||||
* Tapo P110 (plug)
|
||||
* Tapo L530E (bulb)
|
||||
* Tapo L900-5 (led strip)
|
||||
* Tapo L900-10 (led strip)
|
||||
* Kasa KS205 (Wifi/Matter Wall Switch)
|
||||
* Kasa KS225 (Wifi/Matter Wall Dimmer Switch)
|
||||
#### Plugs
|
||||
|
||||
* Tapo P110
|
||||
* Tapo P135 (dimming not yet supported)
|
||||
|
||||
#### Bulbs
|
||||
|
||||
* Tapo L510B
|
||||
* Tapo L530E
|
||||
|
||||
#### Light strips
|
||||
|
||||
* Tapo L900-5
|
||||
* Tapo L900-10
|
||||
* Tapo L920-5
|
||||
|
||||
### Newer Kasa branded devices
|
||||
|
||||
Some newer hardware versions of Kasa branded devices are now using the same protocol as
|
||||
Tapo branded devices. Support for these devices is currently limited as per TAPO branded
|
||||
@ -292,8 +303,11 @@ devices:
|
||||
|
||||
* Kasa EP25 (plug) hw_version 2.6
|
||||
* Kasa KP125M (plug)
|
||||
* Kasa KS205 (Wifi/Matter Wall Switch)
|
||||
* Kasa KS225 (Wifi/Matter Wall Dimmer Switch)
|
||||
|
||||
**If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `devtools/dump_devinfo.py` to generate one).**
|
||||
|
||||
**If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `python -m devtools.dump_devinfo` to generate one).**
|
||||
|
||||
## Resources
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
"""Script that checks if README.md is missing devices that have fixtures."""
|
||||
import sys
|
||||
|
||||
from kasa.tests.conftest import (
|
||||
ALL_DEVICES,
|
||||
BULBS,
|
||||
@ -28,6 +30,12 @@ def _get_device_type(dev, typemap):
|
||||
return "Unknown type"
|
||||
|
||||
|
||||
found_unlisted = False
|
||||
for dev in ALL_DEVICES:
|
||||
if dev not in readme:
|
||||
print(f"{dev} not listed in {_get_device_type(dev, typemap)}")
|
||||
found_unlisted = True
|
||||
|
||||
|
||||
if found_unlisted:
|
||||
sys.exit(-1)
|
||||
|
Loading…
Reference in New Issue
Block a user