homebridge-kasa-python 3.1.0-beta.2 → 3.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -410,14 +410,14 @@ async def handle_fan_speed_level(target: Device, action: str, value: int):
410
410
  async def handle_hsv(target: Device, action: str, feature: str, value: dict):
411
411
  log(f"Handling HSV: action={action}, feature={feature}, value={value}", alias=target.alias)
412
412
  light = target.modules.get(Module.Light)
413
- hsv = light.hsv
414
- h = value.get("hue", hsv[0])
415
- s = value.get("saturation", hsv[1])
416
- v = hsv[2]
417
- hsv[0] = max(0, min(h, 360))
418
- hsv[1] = max(0, min(s, 100))
419
- hsv[2] = max(0, min(v, 100))
420
- await getattr(light, action)(*hsv)
413
+ current_hsv = light.hsv
414
+ h = value.get("hue", current_hsv[0])
415
+ s = value.get("saturation", current_hsv[1])
416
+ v = current_hsv[2]
417
+ new_h = max(0, min(h, 360))
418
+ new_s = max(0, min(s, 100))
419
+ new_v = max(0, min(v, 100))
420
+ await getattr(light, action)(new_h, new_s, new_v)
421
421
 
422
422
  @app.route('/discover', methods=['POST'])
423
423
  async def discover_route():
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge Kasa Python",
3
3
  "name": "homebridge-kasa-python",
4
- "version": "3.1.0-beta.2",
4
+ "version": "3.1.0-beta.3",
5
5
  "description": "Plugin that uses Python-Kasa API to communicate with Kasa Devices.",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -55,14 +55,14 @@
55
55
  ],
56
56
  "devDependencies": {
57
57
  "@eslint/js": "^9.39.2",
58
- "@stylistic/eslint-plugin": "^5.7.0",
59
- "@types/node": "^25.0.8",
58
+ "@stylistic/eslint-plugin": "^5.7.1",
59
+ "@types/node": "^25.0.10",
60
60
  "eslint": "^9.39.2",
61
- "homebridge": "^2.0.0-beta.68",
61
+ "homebridge": "^2.0.0-beta.69",
62
62
  "nodemon": "^3.1.11",
63
63
  "rimraf": "^6.1.2",
64
64
  "ts-node": "^10.9.2",
65
- "typescript-eslint": "^8.53.0"
65
+ "typescript-eslint": "^8.53.1"
66
66
  },
67
67
  "homepage": "https://github.com/ZeliardM/homebridge-kasa-python#readme",
68
68
  "funding": [