Ignore unsupported devices (room sensors, floor heating) in ViCare integration (#112106)

* ignore unsupported devices

* Update __init__.py

* move unsupported device to const

* fix ruff
This commit is contained in:
Christopher Fenner 2024-03-04 07:56:45 +01:00 committed by GitHub
parent 943996b60b
commit e0a8a9d551
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 2 deletions

View File

@ -20,7 +20,13 @@ from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers.storage import STORAGE_DIR
from .const import DEFAULT_CACHE_DURATION, DEVICE_LIST, DOMAIN, PLATFORMS
from .const import (
DEFAULT_CACHE_DURATION,
DEVICE_LIST,
DOMAIN,
PLATFORMS,
UNSUPPORTED_DEVICES,
)
from .types import ViCareDevice
from .utils import get_device
@ -109,5 +115,5 @@ def get_supported_devices(
return [
device_config
for device_config in devices
if device_config.getModel() not in ["Heatbox1", "Heatbox2_SRC"]
if device_config.getModel() not in UNSUPPORTED_DEVICES
]

View File

@ -14,6 +14,15 @@ PLATFORMS = [
Platform.WATER_HEATER,
]
UNSUPPORTED_DEVICES = [
"Heatbox1",
"Heatbox2_SRC",
"E3_FloorHeatingCircuitChannel",
"E3_FloorHeatingCircuitDistributorBox",
"E3_RoomControl_One_522",
"E3_RoomSensor",
]
DEVICE_LIST = "device_list"
VICARE_NAME = "ViCare"