mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Add support for tapo bulbs (#558)
* 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
This commit is contained in:
186
kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json
vendored
Normal file
186
kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "preset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "brightness",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "color_temperature",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "auto_light",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "on_off_gradually",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "light_effect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "bulb_quick_control",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "L530E(EU)",
|
||||
"device_type": "SMART.TAPOBULB",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "bulb",
|
||||
"brightness": 100,
|
||||
"color_temp": 2500,
|
||||
"color_temp_range": [
|
||||
2500,
|
||||
6500
|
||||
],
|
||||
"default_states": {
|
||||
"re_power_type": "always_on",
|
||||
"state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2500,
|
||||
"hue": 0,
|
||||
"saturation": 100
|
||||
},
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": true,
|
||||
"dynamic_light_effect_enable": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.6 Build 230509 Rel.195312",
|
||||
"has_set_location_info": true,
|
||||
"hue": 0,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "3.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "de_DE",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"model": "L530",
|
||||
"nickname": "c21hcnRlIFdMQU4tR2zDvGhiaXJuZQ==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"overheated": false,
|
||||
"region": "Europe/Berlin",
|
||||
"rssi": -38,
|
||||
"saturation": 100,
|
||||
"signal_level": 3,
|
||||
"specs": "",
|
||||
"ssid": "IyNNQVNLRUROQU1FIyM=",
|
||||
"time_diff": 60,
|
||||
"type": "SMART.TAPOBULB"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "Europe/Berlin",
|
||||
"time_diff": 60,
|
||||
"timestamp": 1701618972
|
||||
},
|
||||
"get_device_usage": {
|
||||
"power_usage": {
|
||||
"past30": 107,
|
||||
"past7": 107,
|
||||
"today": 7
|
||||
},
|
||||
"saved_power": {
|
||||
"past30": 535,
|
||||
"past7": 535,
|
||||
"today": 41
|
||||
},
|
||||
"time_usage": {
|
||||
"past30": 642,
|
||||
"past7": 642,
|
||||
"today": 48
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user