diff --git a/README.md b/README.md index f8aa8250..1d84eca0 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ or the `parse_pcap.py` script contained inside the `devtools` directory. * HS105 * HS107 * HS110 +* KP115 ### Power Strips diff --git a/kasa/tests/conftest.py b/kasa/tests/conftest.py index 5b35c75c..46cb8621 100644 --- a/kasa/tests/conftest.py +++ b/kasa/tests/conftest.py @@ -30,12 +30,12 @@ COLOR_BULBS = {"LB130", "KL125", "KL130", *LIGHT_STRIPS} BULBS = {"KL60", "LB100", *VARIABLE_TEMP, *COLOR_BULBS, *LIGHT_STRIPS} -PLUGS = {"HS100", "HS103", "HS105", "HS110", "HS200", "HS210", "EP10"} +PLUGS = {"HS100", "HS103", "HS105", "HS110", "HS200", "HS210", "EP10", "KP115"} STRIPS = {"HS107", "HS300", "KP303", "KP400"} DIMMERS = {"HS220"} DIMMABLE = {*BULBS, *DIMMERS} -WITH_EMETER = {"HS110", "HS300", *BULBS} +WITH_EMETER = {"HS110", "HS300", "KP115", *BULBS} ALL_DEVICES = BULBS.union(PLUGS).union(STRIPS).union(DIMMERS) diff --git a/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json b/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json new file mode 100644 index 00000000..790597dc --- /dev/null +++ b/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json @@ -0,0 +1,42 @@ +{ + "emeter": { + "get_realtime": { + "current_ma": 0, + "err_code": 0, + "power_mw": 0, + "total_wh": 0, + "voltage_mv": 231561 + } + }, + "system": { + "get_sysinfo": { + "active_mode": "none", + "alias": "TP-LINK_Smart Plug_330B", + "dev_name": "Smart Wi-Fi Plug Mini", + "deviceId": "0000000000000000000000000000000000000000", + "err_code": 0, + "feature": "TIM:ENE", + "hwId": "00000000000000000000000000000000", + "hw_ver": "1.0", + "icon_hash": "", + "latitude_i": 0, + "led_off": 0, + "longitude_i": 0, + "mac": "00:00:00:00:00:00", + "mic_type": "IOT.SMARTPLUGSWITCH", + "model": "KP115(EU)", + "next_action": { + "type": -1 + }, + "ntc_state": 0, + "obd_src": "tplink", + "oemId": "00000000000000000000000000000000", + "on_time": 197, + "relay_state": 1, + "rssi": -70, + "status": "new", + "sw_ver": "1.0.16 Build 210205 Rel.163735", + "updating": 0 + } + } +}