mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Remove device category filtering from Tuya init (#58019)
This commit is contained in:
parent
961ee717ef
commit
4f2d313a4a
@ -33,7 +33,6 @@ from .const import (
|
||||
PLATFORMS,
|
||||
TUYA_DISCOVERY_NEW,
|
||||
TUYA_HA_SIGNAL_UPDATE_ENTITY,
|
||||
TUYA_SUPPORTED_PRODUCT_CATEGORIES,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@ -118,7 +117,6 @@ async def _init_tuya_sdk(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
# Register known device IDs
|
||||
for device in device_manager.device_map.values():
|
||||
if device.category in TUYA_SUPPORTED_PRODUCT_CATEGORIES:
|
||||
device_ids.add(device.id)
|
||||
|
||||
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
||||
@ -178,7 +176,6 @@ class DeviceListener(TuyaDeviceListener):
|
||||
|
||||
def add_device(self, device: TuyaDevice) -> None:
|
||||
"""Add device added listener."""
|
||||
if device.category in TUYA_SUPPORTED_PRODUCT_CATEGORIES:
|
||||
# Ensure the device isn't present stale
|
||||
self.hass.add_job(self.async_remove_device, device.id)
|
||||
|
||||
|
@ -84,41 +84,6 @@ TUYA_RESPONSE_MSG = "msg"
|
||||
TUYA_RESPONSE_SUCCESS = "success"
|
||||
TUYA_RESPONSE_PLATFORM_URL = "platform_url"
|
||||
|
||||
TUYA_SUPPORTED_PRODUCT_CATEGORIES = (
|
||||
"bh", # Smart Kettle
|
||||
"cwysj", # Pet Water Feeder
|
||||
"cz", # Socket
|
||||
"dc", # Light string
|
||||
"dd", # Light strip
|
||||
"dj", # Light
|
||||
"dlq", # Breaker
|
||||
"fs", # Fan
|
||||
"fsd", # Ceiling Fan Light
|
||||
"fwd", # Ambient Light
|
||||
"fwl", # Ambient light
|
||||
"gyd", # Motion Sensor Light
|
||||
"jsq", # Humidifier's light
|
||||
"kfj", # Coffee maker
|
||||
"kg", # Switch
|
||||
"kj", # Air Purifier
|
||||
"kt", # Air conditioner
|
||||
"ldcg", # Luminance Sensor
|
||||
"mcs", # Door Window Sensor
|
||||
"pc", # Power Strip
|
||||
"pir", # PIR Detector
|
||||
"qn", # Heater
|
||||
"sd", # Robot vacuum
|
||||
"sgbj", # Siren Alarm
|
||||
"sos", # SOS Button
|
||||
"sp", # Smart Camera
|
||||
"tgq", # Dimmer
|
||||
"tyndj", # Solar Light
|
||||
"wk", # Thermostat
|
||||
"xdd", # Ceiling Light
|
||||
"xxj", # Diffuser
|
||||
"zd", # Vibration Sensor
|
||||
)
|
||||
|
||||
TUYA_SMART_APP = "tuyaSmart"
|
||||
SMARTLIFE_APP = "smartlife"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user