Refactor Freebox Home categories (#99224)

This commit is contained in:
Quentame 2023-08-29 12:43:22 +02:00 committed by GitHub
parent 62b1211dee
commit 750cfeb76a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 17 deletions

View file

@ -28,7 +28,7 @@ from .const import (
APP_DESC,
CONNECTION_SENSORS_KEYS,
DOMAIN,
HOME_COMPATIBLE_PLATFORMS,
HOME_COMPATIBLE_CATEGORIES,
STORAGE_KEY,
STORAGE_VERSION,
)
@ -190,7 +190,7 @@ class FreeboxRouter:
new_device = False
for home_node in home_nodes:
if home_node["category"] in HOME_COMPATIBLE_PLATFORMS:
if home_node["category"] in HOME_COMPATIBLE_CATEGORIES:
if self.home_devices.get(home_node["id"]) is None:
new_device = True
self.home_devices[home_node["id"]] = home_node