mirror of
				https://github.com/python-kasa/python-kasa.git
				synced 2025-11-04 06:32:07 +00:00 
			
		
		
		
	Add fixtures for KS230 (#355)
This commit is contained in:
		@@ -139,6 +139,7 @@ or the `parse_pcap.py` script contained inside the `devtools` directory.
 | 
			
		||||
* HS210
 | 
			
		||||
* HS220
 | 
			
		||||
* KS220M
 | 
			
		||||
* KS230
 | 
			
		||||
 | 
			
		||||
### Bulbs
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ PLUGS = {
 | 
			
		||||
    "KP401",
 | 
			
		||||
}
 | 
			
		||||
STRIPS = {"HS107", "HS300", "KP303", "KP400", "EP40"}
 | 
			
		||||
DIMMERS = {"HS220", "KS220M"}
 | 
			
		||||
DIMMERS = {"HS220", "KS220M", "KS230"}
 | 
			
		||||
 | 
			
		||||
DIMMABLE = {*BULBS, *DIMMERS}
 | 
			
		||||
WITH_EMETER = {"HS110", "HS300", "KP115", "KP125", *BULBS}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										64
									
								
								kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
{
 | 
			
		||||
    "smartlife.iot.dimmer": {
 | 
			
		||||
        "get_dimmer_parameters": {
 | 
			
		||||
            "bulb_type": 1,
 | 
			
		||||
            "err_code": 0,
 | 
			
		||||
            "fadeOffTime": 1000,
 | 
			
		||||
            "fadeOnTime": 1000,
 | 
			
		||||
            "gentleOffTime": 10000,
 | 
			
		||||
            "gentleOnTime": 3000,
 | 
			
		||||
            "minThreshold": 11,
 | 
			
		||||
            "rampRate": 30
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "system": {
 | 
			
		||||
        "get_sysinfo": {
 | 
			
		||||
            "active_mode": "none",
 | 
			
		||||
            "alias": "Test KS230",
 | 
			
		||||
            "brightness": 60,
 | 
			
		||||
            "dc_state": 0,
 | 
			
		||||
            "dev_name": "Wi-Fi Smart 3-Way Dimmer",
 | 
			
		||||
            "deviceId": "0000000000000000000000000000000000000000",
 | 
			
		||||
            "err_code": 0,
 | 
			
		||||
            "feature": "TIM",
 | 
			
		||||
            "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": "KS230(US)",
 | 
			
		||||
            "next_action": {
 | 
			
		||||
                "type": -1
 | 
			
		||||
            },
 | 
			
		||||
            "ntc_state": 0,
 | 
			
		||||
            "oemId": "00000000000000000000000000000000",
 | 
			
		||||
            "on_time": 0,
 | 
			
		||||
            "preferred_state": [
 | 
			
		||||
                {
 | 
			
		||||
                    "brightness": 100,
 | 
			
		||||
                    "index": 0
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
                    "brightness": 75,
 | 
			
		||||
                    "index": 1
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
                    "brightness": 50,
 | 
			
		||||
                    "index": 2
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
                    "brightness": 25,
 | 
			
		||||
                    "index": 3
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "relay_state": 0,
 | 
			
		||||
            "rssi": -52,
 | 
			
		||||
            "status": "new",
 | 
			
		||||
            "sw_ver": "1.0.14 Build 220127 Rel.124555",
 | 
			
		||||
            "updating": 0
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user