mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Narrow zwave_js USB discovery (#55613)
- Avoid triggering discovery when we can know in advance the device is not a Z-Wave stick
This commit is contained in:
parent
8af0cb9e65
commit
d8a81a54d8
@ -326,11 +326,6 @@ class ConfigFlow(BaseZwaveJSFlow, config_entries.ConfigFlow, domain=DOMAIN):
|
||||
device = discovery_info["device"]
|
||||
manufacturer = discovery_info["manufacturer"]
|
||||
description = discovery_info["description"]
|
||||
# The Nortek sticks are a special case since they
|
||||
# have a Z-Wave and a Zigbee radio. We need to reject
|
||||
# the Zigbee radio.
|
||||
if vid == "10C4" and pid == "8A2A" and "Z-Wave" not in description:
|
||||
return self.async_abort(reason="not_zwave_device")
|
||||
# Zooz uses this vid/pid, but so do 2652 sticks
|
||||
if vid == "10C4" and pid == "EA60" and "2652" in description:
|
||||
return self.async_abort(reason="not_zwave_device")
|
||||
|
@ -9,7 +9,7 @@
|
||||
"iot_class": "local_push",
|
||||
"usb": [
|
||||
{"vid":"0658","pid":"0200","known_devices":["Aeotec Z-Stick Gen5+", "Z-WaveMe UZB"]},
|
||||
{"vid":"10C4","pid":"8A2A","known_devices":["Nortek HUSBZB-1"]},
|
||||
{"vid":"10C4","pid":"8A2A","description":"*z-wave*","known_devices":["Nortek HUSBZB-1"]},
|
||||
{"vid":"10C4","pid":"EA60","known_devices":["Aeotec Z-Stick 7", "Silicon Labs UZB-7", "Zooz ZST10 700"]}
|
||||
]
|
||||
}
|
||||
|
@ -32,7 +32,8 @@ USB = [
|
||||
{
|
||||
"domain": "zwave_js",
|
||||
"vid": "10C4",
|
||||
"pid": "8A2A"
|
||||
"pid": "8A2A",
|
||||
"description": "*z-wave*"
|
||||
},
|
||||
{
|
||||
"domain": "zwave_js",
|
||||
|
@ -756,10 +756,7 @@ async def test_usb_discovery_already_running(hass, supervisor, addon_running):
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"discovery_info",
|
||||
[
|
||||
NORTEK_ZIGBEE_DISCOVERY_INFO,
|
||||
CP2652_ZIGBEE_DISCOVERY_INFO,
|
||||
],
|
||||
[CP2652_ZIGBEE_DISCOVERY_INFO],
|
||||
)
|
||||
async def test_abort_usb_discovery_aborts_specific_devices(
|
||||
hass, supervisor, addon_options, discovery_info
|
||||
|
Loading…
x
Reference in New Issue
Block a user