From 0f1ef8be25315f8fcfacb63d1cf5e7c79e027b0c Mon Sep 17 00:00:00 2001
From: Leslie Liang <liang.leslie@gmail.com>
Date: Sun, 20 Aug 2023 00:58:18 +0000
Subject: [PATCH] use name instead of default_name to fix device

---
 custom_components/nea_sg_weather/camera.py  | 2 +-
 custom_components/nea_sg_weather/sensor.py  | 6 +++---
 custom_components/nea_sg_weather/weather.py | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/custom_components/nea_sg_weather/camera.py b/custom_components/nea_sg_weather/camera.py
index 86911aa301..14bfff0796 100644
--- a/custom_components/nea_sg_weather/camera.py
+++ b/custom_components/nea_sg_weather/camera.py
@@ -206,7 +206,7 @@ def extra_state_attributes(self) -> dict:
     def device_info(self) -> DeviceInfo:
         """Device info."""
         return DeviceInfo(
-            default_name="Weather forecast coordinator",
+            name="Weather forecast coordinator",
             identifiers={(DOMAIN,)},  # type: ignore[arg-type]
             manufacturer="NEA Weather",
             model="data.gov.sg API Polling",
diff --git a/custom_components/nea_sg_weather/sensor.py b/custom_components/nea_sg_weather/sensor.py
index 7a3d3541fe..38070a189b 100644
--- a/custom_components/nea_sg_weather/sensor.py
+++ b/custom_components/nea_sg_weather/sensor.py
@@ -123,7 +123,7 @@ def extra_state_attributes(self) -> dict:
     def device_info(self) -> DeviceInfo:
         """Device info."""
         return DeviceInfo(
-            default_name="Weather forecast coordinator",
+            name="Weather forecast coordinator",
             identifiers={(DOMAIN,)},  # type: ignore[arg-type]
             manufacturer="NEA Weather",
             model="data.gov.sg API Polling",
@@ -195,7 +195,7 @@ def extra_state_attributes(self) -> dict:
     def device_info(self) -> DeviceInfo:
         """Device info."""
         return DeviceInfo(
-            default_name="Weather forecast coordinator",
+            name="Weather forecast coordinator",
             identifiers={(DOMAIN,)},  # type: ignore[arg-type]
             manufacturer="NEA Weather",
             model="data.gov.sg API Polling",
@@ -286,7 +286,7 @@ def extra_state_attributes(self) -> dict:
     def device_info(self) -> DeviceInfo:
         """Device info."""
         return DeviceInfo(
-            default_name="Weather forecast coordinator",
+            name="Weather forecast coordinator",
             identifiers={(DOMAIN,)},  # type: ignore[arg-type]
             manufacturer="NEA Weather",
             model="data.gov.sg API Polling",
diff --git a/custom_components/nea_sg_weather/weather.py b/custom_components/nea_sg_weather/weather.py
index 6a2c29fe5d..d70eb01222 100644
--- a/custom_components/nea_sg_weather/weather.py
+++ b/custom_components/nea_sg_weather/weather.py
@@ -135,7 +135,7 @@ def extra_state_attributes(self) -> dict:
     def device_info(self) -> DeviceInfo:
         """Device info."""
         return DeviceInfo(
-            default_name="Weather forecast coordinator",
+            name="Weather forecast coordinator",
             identifiers={(DOMAIN,)},  # type: ignore[arg-type]
             manufacturer="NEA Weather",
             model="data.gov.sg API Polling",