mirror of
				https://github.com/python-kasa/python-kasa.git
				synced 2025-11-03 22:22:06 +00:00 
			
		
		
		
	Add KP125 test fixture and support note. (#350)
* Add KP125 test fixture and support note. Signed-off-by: James Alseth <james@jalseth.me> * mark KP125 having an emeter Co-authored-by: Teemu R <tpr@iki.fi>
This commit is contained in:
		@@ -122,6 +122,7 @@ or the `parse_pcap.py` script contained inside the `devtools` directory.
 | 
			
		||||
* KP100
 | 
			
		||||
* KP105
 | 
			
		||||
* KP115
 | 
			
		||||
* KP125
 | 
			
		||||
* KP401
 | 
			
		||||
 | 
			
		||||
### Power Strips
 | 
			
		||||
 
 | 
			
		||||
@@ -49,15 +49,16 @@ PLUGS = {
 | 
			
		||||
    "HS210",
 | 
			
		||||
    "EP10",
 | 
			
		||||
    "KP100",
 | 
			
		||||
    "KP115",
 | 
			
		||||
    "KP105",
 | 
			
		||||
    "KP115",
 | 
			
		||||
    "KP125",
 | 
			
		||||
    "KP401",
 | 
			
		||||
}
 | 
			
		||||
STRIPS = {"HS107", "HS300", "KP303", "KP400", "EP40"}
 | 
			
		||||
DIMMERS = {"HS220", "KS220M"}
 | 
			
		||||
 | 
			
		||||
DIMMABLE = {*BULBS, *DIMMERS}
 | 
			
		||||
WITH_EMETER = {"HS110", "HS300", "KP115", *BULBS}
 | 
			
		||||
WITH_EMETER = {"HS110", "HS300", "KP115", "KP125", *BULBS}
 | 
			
		||||
 | 
			
		||||
ALL_DEVICES = BULBS.union(PLUGS).union(STRIPS).union(DIMMERS)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										42
									
								
								kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
{
 | 
			
		||||
    "emeter": {
 | 
			
		||||
        "get_realtime": {
 | 
			
		||||
            "current_ma": 978,
 | 
			
		||||
            "err_code": 0,
 | 
			
		||||
            "power_mw": 100277,
 | 
			
		||||
            "total_wh": 12170,
 | 
			
		||||
            "voltage_mv": 119425
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "system": {
 | 
			
		||||
        "get_sysinfo": {
 | 
			
		||||
            "active_mode": "none",
 | 
			
		||||
            "alias": "Test plug",
 | 
			
		||||
            "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": "KP125(US)",
 | 
			
		||||
            "next_action": {
 | 
			
		||||
                "type": -1
 | 
			
		||||
            },
 | 
			
		||||
            "ntc_state": 0,
 | 
			
		||||
            "obd_src": "tplink",
 | 
			
		||||
            "oemId": "00000000000000000000000000000000",
 | 
			
		||||
            "on_time": 301,
 | 
			
		||||
            "relay_state": 1,
 | 
			
		||||
            "rssi": -41,
 | 
			
		||||
            "status": "configured",
 | 
			
		||||
            "sw_ver": "1.0.6 Build 210928 Rel.185924",
 | 
			
		||||
            "updating": 0
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user