homebridge-kasa-python 2.7.2-beta.3 → 2.7.2-beta.4

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.
@@ -140,6 +140,7 @@ async def discover_devices(
140
140
 
141
141
  async def discover_on_broadcast(broadcast: str):
142
142
  print(f"Discovering on broadcast: {broadcast}")
143
+ discovered = {}
143
144
  try:
144
145
  discovered = await Discover.discover(
145
146
  target=broadcast, credentials=credentials, on_discovered=on_discovered
@@ -150,6 +151,11 @@ async def discover_devices(
150
151
  devices.update(discovered)
151
152
  except Exception as e:
152
153
  print(f"Error during broadcast discovery: {e}", file=sys.stderr)
154
+ finally:
155
+ for host in list(discovered.keys()):
156
+ if host in device_config_cache:
157
+ del devices[host]
158
+ devices.update(discovered)
153
159
 
154
160
  async def discover_manual_device(host: str):
155
161
  if host in devices or host in device_config_cache:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge Kasa Python",
3
3
  "name": "homebridge-kasa-python",
4
- "version": "2.7.2-beta.3",
4
+ "version": "2.7.2-beta.4",
5
5
  "description": "Plugin that uses Python-Kasa API to communicate with Kasa Devices.",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -13,8 +13,8 @@
13
13
  "url": "https://github.com/ZeliardM/homebridge-kasa-python/issues"
14
14
  },
15
15
  "engines": {
16
- "homebridge": "^1.8.0 || ^2.0.0-beta.0",
17
- "node": "^18.20.6 || ^20.18.3 || ^22.14.0 || ^23.9.0",
16
+ "homebridge": "^1.9.0 || ^2.0.0-beta.0",
17
+ "node": "^18.20.7 || ^20.19.0 || ^22.14.0",
18
18
  "python": "^3.11.0"
19
19
  },
20
20
  "main": "dist/index.js",
@@ -49,18 +49,18 @@
49
49
  ],
50
50
  "devDependencies": {
51
51
  "@eslint/eslintrc": "^3.3.0",
52
- "@eslint/js": "^9.21.0",
53
- "@types/node": "^22.13.9",
54
- "@typescript-eslint/parser": "^8.26.0",
52
+ "@eslint/js": "^9.22.0",
53
+ "@types/node": "^22.13.10",
54
+ "@typescript-eslint/parser": "^8.26.1",
55
55
  "@stylistic/eslint-plugin": "^4.2.0",
56
- "eslint": "^9.21.0",
56
+ "eslint": "^9.22.0",
57
57
  "globals": "^16.0.0",
58
58
  "homebridge": "^2.0.0-beta.27",
59
59
  "node-persist": "^4.0.4",
60
60
  "nodemon": "^3.1.9",
61
61
  "rimraf": "^6.0.1",
62
62
  "ts-node": "^10.9.2",
63
- "typescript-eslint": "^8.26.0"
63
+ "typescript-eslint": "^8.26.1"
64
64
  },
65
65
  "homepage": "https://github.com/ZeliardM/homebridge-kasa-python#readme",
66
66
  "funding": [
@@ -74,7 +74,7 @@
74
74
  }
75
75
  ],
76
76
  "dependencies": {
77
- "axios": "^1.8.2",
77
+ "axios": "^1.8.3",
78
78
  "ts-essentials": "^10.0.4",
79
79
  "typescript": "^5.8.2"
80
80
  },