From 4adbf7c73076571ebbfe6779591e84f5b820404a Mon Sep 17 00:00:00 2001
From: Jan-Philipp Benecke <jan-philipp@bnck.me>
Date: Thu, 28 Mar 2024 23:05:47 +0100
Subject: [PATCH] Migrate nina to use single_config_entry (#114408)

---
 homeassistant/components/nina/config_flow.py | 3 ---
 homeassistant/components/nina/manifest.json  | 3 ++-
 homeassistant/components/nina/strings.json   | 3 ---
 homeassistant/generated/integrations.json    | 3 ++-
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/homeassistant/components/nina/config_flow.py b/homeassistant/components/nina/config_flow.py
index 07c3f6fe9a1..3b8b290d6c8 100644
--- a/homeassistant/components/nina/config_flow.py
+++ b/homeassistant/components/nina/config_flow.py
@@ -107,9 +107,6 @@ class NinaConfigFlow(ConfigFlow, domain=DOMAIN):
         """Handle the initial step."""
         errors: dict[str, Any] = {}
 
-        if self._async_current_entries():
-            return self.async_abort(reason="single_instance_allowed")
-
         if not self._all_region_codes_sorted:
             nina: Nina = Nina(async_get_clientsession(self.hass))
 
diff --git a/homeassistant/components/nina/manifest.json b/homeassistant/components/nina/manifest.json
index 1bf670aedf0..53a54f26dcf 100644
--- a/homeassistant/components/nina/manifest.json
+++ b/homeassistant/components/nina/manifest.json
@@ -6,5 +6,6 @@
   "documentation": "https://www.home-assistant.io/integrations/nina",
   "iot_class": "cloud_polling",
   "loggers": ["pynina"],
-  "requirements": ["PyNINA==0.3.3"]
+  "requirements": ["PyNINA==0.3.3"],
+  "single_config_entry": true
 }
diff --git a/homeassistant/components/nina/strings.json b/homeassistant/components/nina/strings.json
index 5e0393d024f..98ea88d8798 100644
--- a/homeassistant/components/nina/strings.json
+++ b/homeassistant/components/nina/strings.json
@@ -15,9 +15,6 @@
         }
       }
     },
-    "abort": {
-      "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
-    },
     "error": {
       "no_selection": "Please select at least one city/county",
       "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json
index 701b2084d7d..06b325f7999 100644
--- a/homeassistant/generated/integrations.json
+++ b/homeassistant/generated/integrations.json
@@ -3998,7 +3998,8 @@
       "name": "NINA",
       "integration_type": "hub",
       "config_flow": true,
-      "iot_class": "cloud_polling"
+      "iot_class": "cloud_polling",
+      "single_config_entry": true
     },
     "nissan_leaf": {
       "name": "Nissan Leaf",
-- 
GitLab