From 42e0bc849c2854de4aac23c187ac8551ef9d6b18 Mon Sep 17 00:00:00 2001
From: Avi Miller <me@dje.li>
Date: Sun, 17 Apr 2022 06:08:44 +1000
Subject: [PATCH] Narrow down the list of LIFX models for HomeKit discovery
 (#70125)

* Narrow down the list of LIFX models for HomeKit discovery

This allows the LIFX Switch to be integrated using the HomeKit
Controller component. I also adjusted the zeroconf test so that
the partial match still matches the lifx integration.

Signed-off-by: Avi Miller <me@dje.li>

* Update tests/components/zeroconf/test_init.py

Co-authored-by: J. Nick Koston <nick@koston.org>
---
 homeassistant/components/lifx/manifest.json | 16 +++++++++++++++-
 homeassistant/generated/zeroconf.py         | 14 +++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/homeassistant/components/lifx/manifest.json b/homeassistant/components/lifx/manifest.json
index 9251bcb1f50..9b975d4614a 100644
--- a/homeassistant/components/lifx/manifest.json
+++ b/homeassistant/components/lifx/manifest.json
@@ -5,7 +5,21 @@
   "documentation": "https://www.home-assistant.io/integrations/lifx",
   "requirements": ["aiolifx==0.7.1", "aiolifx_effects==0.2.2"],
   "homekit": {
-    "models": ["LIFX"]
+    "models": [
+      "LIFX A19",
+      "LIFX Beam",
+      "LIFX BR30",
+      "LIFX Candle",
+      "LIFX Clean",
+      "LIFX Color",
+      "LIFX Dlight",
+      "LIFX Filament",
+      "LIFX GU10",
+      "LIFX Mini",
+      "LIFX Nightvision",
+      "LIFX White",
+      "LIFX Z"
+    ]
   },
   "codeowners": [],
   "iot_class": "local_polling",
diff --git a/homeassistant/generated/zeroconf.py b/homeassistant/generated/zeroconf.py
index 2a0a4d767a9..98be7817113 100644
--- a/homeassistant/generated/zeroconf.py
+++ b/homeassistant/generated/zeroconf.py
@@ -398,7 +398,19 @@ HOMEKIT = {
     "EB-*": "ecobee",
     "Healty Home Coach": "netatmo",
     "Iota": "abode",
-    "LIFX": "lifx",
+    "LIFX A19": "lifx",
+    "LIFX BR30": "lifx",
+    "LIFX Beam": "lifx",
+    "LIFX Candle": "lifx",
+    "LIFX Clean": "lifx",
+    "LIFX Color": "lifx",
+    "LIFX Dlight": "lifx",
+    "LIFX Filament": "lifx",
+    "LIFX GU10": "lifx",
+    "LIFX Mini": "lifx",
+    "LIFX Nightvision": "lifx",
+    "LIFX White": "lifx",
+    "LIFX Z": "lifx",
     "MYQ": "myq",
     "NL29": "nanoleaf",
     "NL42": "nanoleaf",