From 6863db8d8aee99cdf139744784774fbc710238f3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:31:44 +0000 Subject: [PATCH 01/24] Update device: Sonesse_28_WF_Li_Ion_Roller by SOMFY (#367) Co-authored-by: andrew-codechimp --- custom_components/battery_notes/data/library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 1ebd24281..9e09bb801 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -1476,7 +1476,7 @@ { "manufacturer": "SOMFY", "model": "Sonesse 28 WF Li-Ion Roller", - "battery_type": "Rechargeable" + "battery_type": "MANUAL" }, { "manufacturer": "Sonoff", From d8bc08c940bec9d7e71cbd3a864d19cb5bae4022 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Fri, 5 Jan 2024 13:32:04 +0000 Subject: [PATCH 02/24] Apply automatic changes --- library.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.md b/library.md index 40b539489..5126e3d06 100644 --- a/library.md +++ b/library.md @@ -273,7 +273,7 @@ This file is auto generated, do not modify |SmartThings |moisturev4 |CR2 | |SmartThings |Motion sensor (2018 model) (IM6001-MTP01) |CR2 | |SmartThings |Multipurpose sensor (2018 model) (IM6001-MPP01) |CR2450 | -|SOMFY |Sonesse 28 WF Li-Ion Roller |Rechargeable | +|SOMFY |Sonesse 28 WF Li-Ion Roller |MANUAL | |Sonoff |Contact sensor (SNZB-04) |CR2032 | |SONOFF |Motion sensor (SNZB-03) |CR2450 | |Sonoff |SNZB-02 |CR2450 | From 4149b8d46fb00809d12b4026d2a70dc1981803a9 Mon Sep 17 00:00:00 2001 From: lukerix <93864731+lukerix@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:29:23 +0100 Subject: [PATCH 03/24] Devices added to the library (#368) * added devices * Update library.json --------- Co-authored-by: Andrew Jackson --- .../battery_notes/data/library.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 9e09bb801..998c9341a 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -50,6 +50,11 @@ "battery_type": "AAA", "battery_quantity": 2 }, + { + "manufacturer": "_TZ3000_mh9px7cq", + "model": "TS0044", + "battery_type": "A23" + }, { "manufacturer": "_TZ3000_wkai4ga5", "model": "TS0044", @@ -553,6 +558,11 @@ "model": "TH01", "battery_type": "CR2450" }, + { + "manufacturer": "eWeLink", + "model": "WB01", + "battery_type": "CR2450" + }, { "manufacturer": "Fantem", "model": "4 in 1 multi sensor (ZB003-X)", @@ -2067,6 +2077,11 @@ "model": "ble XMWSDJ04MMC", "battery_type": "CR2450" }, + { + "manufacturer": "Xiaomi", + "model": "BTHome sensor", + "battery_type": "CR2032" + }, { "manufacturer": "Xiaomi", "model": "GZCGQ01LM", @@ -2234,4 +2249,4 @@ "battery_type": "CR2032" } ] -} \ No newline at end of file +} From 0684f0a979824013d6993e7b3877a6156aaaff19 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Fri, 5 Jan 2024 14:29:41 +0000 Subject: [PATCH 04/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 2 +- library.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 998c9341a..8610e9a52 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2249,4 +2249,4 @@ "battery_type": "CR2032" } ] -} +} \ No newline at end of file diff --git a/library.md b/library.md index 5126e3d06..aeec4cf86 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 410 Devices in library +## 413 Devices in library This file is auto generated, do not modify @@ -13,6 +13,7 @@ This file is auto generated, do not modify |_TZ3000_fllyghyj |TS0201 |2x AAA | |_TZ3000_k4ej3ww2 |TS0207 |CR2032 | |_TZ3000_lf56vpxj |TS0202 |2x AAA | +|_TZ3000_mh9px7cq |TS0044 |A23 | |_TZ3000_wkai4ga5 |TS0044 |CR2430 | |_TZ3000_xr3htd96 |TS0201 |2x AAA | |_TZ3000_yxqnffam |TS0203 |2x AAA | @@ -102,6 +103,7 @@ This file is auto generated, do not modify |eWeLink |MS01 |CR2450 | |eWeLink |SNZB-02P |CR2477 | |eWeLink |TH01 |CR2450 | +|eWeLink |WB01 |CR2450 | |Fantem |4 in 1 multi sensor (ZB003-X) |2x CR123A | |Fibargroup |FGDW002 |ER14250 | |Fibargroup |FGFS101 |CR123A | @@ -383,6 +385,7 @@ This file is auto generated, do not modify |Xiaomi |ble RTCGQ02LM |CR2450 | |Xiaomi |ble XMPIR02SXS |CR2450 | |Xiaomi |ble XMWSDJ04MMC |CR2450 | +|Xiaomi |BTHome sensor |CR2032 | |Xiaomi |GZCGQ01LM |CR2450 | |Xiaomi |HHCCJCY01 |CR2032 | |Xiaomi |LYWSD03MMC |CR2032 | From 1c134ae14fd4e9f774b16dbe1980f02269e03b36 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:32:04 +0000 Subject: [PATCH 05/24] Update device: Temperature_Humidity_sensor by Xiaomi (#370) --- custom_components/battery_notes/data/library.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 8610e9a52..9c454fabc 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2247,6 +2247,11 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "Xiaomi", + "model": "Temperature/Humidity sensor", + "battery_type": "CR2032" } ] } \ No newline at end of file From 4882b457f8a2be0e9250fcbd1db5dec2ac599ab2 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Fri, 5 Jan 2024 16:32:24 +0000 Subject: [PATCH 06/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 10 +++++----- library.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 9c454fabc..1d0b972aa 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2164,6 +2164,11 @@ "model": "Temperature & humidity sensor (LYWSD03MMC)", "battery_type": "CR2032" }, + { + "manufacturer": "Xiaomi", + "model": "Temperature/Humidity sensor", + "battery_type": "CR2032" + }, { "manufacturer": "Xiaomi", "model": "WSDCGQ01LM", @@ -2247,11 +2252,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "Xiaomi", - "model": "Temperature/Humidity sensor", - "battery_type": "CR2032" } ] } \ No newline at end of file diff --git a/library.md b/library.md index aeec4cf86..762b17734 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 413 Devices in library +## 414 Devices in library This file is auto generated, do not modify @@ -402,6 +402,7 @@ This file is auto generated, do not modify |Xiaomi |RTCGQ01LM |CR2450 | |Xiaomi |SRTS-A01 |2x AA | |Xiaomi |Temperature & humidity sensor (LYWSD03MMC) |CR2032 | +|Xiaomi |Temperature/Humidity sensor |CR2032 | |Xiaomi |WSDCGQ01LM |CR2032 | |Xiaomi |XMTZC02HM/XMTZC05HM/NUN4049CN |4x AAA | |Xiaomi |XMWSDJ04MMC |CR2450 | From 7303901998055bdb52470c92eb6c504f94769017 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:32:57 +0000 Subject: [PATCH 07/24] Update device: Acurite_986 by rtl_433 (#372) --- custom_components/battery_notes/data/library.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 1d0b972aa..3e3790b2a 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2252,6 +2252,12 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "rtl_433", + "model": "Acurite-986", + "battery_type": "AA", + "battery_quantity": 2 } ] } \ No newline at end of file From 373b9840a7a18a0d9b786773849a88af76312d88 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Fri, 5 Jan 2024 16:33:14 +0000 Subject: [PATCH 08/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 12 ++++++------ library.md | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 3e3790b2a..8ae3b99d8 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -1296,6 +1296,12 @@ "model": "roborock.vacuum.a15", "battery_type": "Rechargeable" }, + { + "manufacturer": "rtl_433", + "model": "Acurite-986", + "battery_type": "AA", + "battery_quantity": 2 + }, { "manufacturer": "rtl_433", "model": "Acurite-Tower", @@ -2252,12 +2258,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "rtl_433", - "model": "Acurite-986", - "battery_type": "AA", - "battery_quantity": 2 } ] } \ No newline at end of file diff --git a/library.md b/library.md index 762b17734..eeb1e476f 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 414 Devices in library +## 415 Devices in library This file is auto generated, do not modify @@ -240,6 +240,7 @@ This file is auto generated, do not modify |Ring |Motion Sensor |2x AA | |Ring |Security Keypad |Rechargeable | |Roborock |roborock.vacuum.a15 |Rechargeable | +|rtl_433 |Acurite-986 |2x AA | |rtl_433 |Acurite-Tower |2x AA | |Ruuvi |Ruuvitag |CR2477T | |Samjin |motion |CR2 | From e590761a35030c9e178680e382043c9333b763b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:33:40 +0000 Subject: [PATCH 09/24] Update device: Vauno_EN8822C by rtl_433 (#374) --- custom_components/battery_notes/data/library.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 8ae3b99d8..3d3629030 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2258,6 +2258,12 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "rtl_433", + "model": "Vauno-EN8822C", + "battery_type": "AAA", + "battery_quantity": 2 } ] } \ No newline at end of file From 6120bf5b1d7e010624faa37f27f646c0d75461dd Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Fri, 5 Jan 2024 16:34:00 +0000 Subject: [PATCH 10/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 12 ++++++------ library.md | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 3d3629030..8b99a782f 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -1308,6 +1308,12 @@ "battery_type": "AA", "battery_quantity": 2 }, + { + "manufacturer": "rtl_433", + "model": "Vauno-EN8822C", + "battery_type": "AAA", + "battery_quantity": 2 + }, { "manufacturer": "Ruuvi", "model": "Ruuvitag", @@ -2258,12 +2264,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "rtl_433", - "model": "Vauno-EN8822C", - "battery_type": "AAA", - "battery_quantity": 2 } ] } \ No newline at end of file diff --git a/library.md b/library.md index eeb1e476f..435502baf 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 415 Devices in library +## 416 Devices in library This file is auto generated, do not modify @@ -242,6 +242,7 @@ This file is auto generated, do not modify |Roborock |roborock.vacuum.a15 |Rechargeable | |rtl_433 |Acurite-986 |2x AA | |rtl_433 |Acurite-Tower |2x AA | +|rtl_433 |Vauno-EN8822C |2x AAA | |Ruuvi |Ruuvitag |CR2477T | |Samjin |motion |CR2 | |Samjin |multi |CR2450 | From 222914e83b0c9a9cfdbf29262e698b167299467f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:43:08 +0000 Subject: [PATCH 11/24] Update device: Back_UPS_ES_600M1 by American_Power_Conversion (#377) --- custom_components/battery_notes/data/library.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 8b99a782f..51e35eda1 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2264,6 +2264,11 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "American Power Conversion", + "model": "Back-UPS ES 600M1", + "battery_type": "Rechargable" } ] } \ No newline at end of file From 55dcc8b0f0e5b444c420d8b28f0050c69d510ef2 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Fri, 5 Jan 2024 20:43:27 +0000 Subject: [PATCH 12/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 10 +++++----- library.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 51e35eda1..7beed31cd 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -161,6 +161,11 @@ "battery_type": "AAA", "battery_quantity": 4 }, + { + "manufacturer": "American Power Conversion", + "model": "Back-UPS ES 600M1", + "battery_type": "Rechargable" + }, { "manufacturer": "American Power Conversion", "model": "Back-UPS XS 1500M", @@ -2264,11 +2269,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "American Power Conversion", - "model": "Back-UPS ES 600M1", - "battery_type": "Rechargable" } ] } \ No newline at end of file diff --git a/library.md b/library.md index 435502baf..fd0454b26 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 416 Devices in library +## 417 Devices in library This file is auto generated, do not modify @@ -33,6 +33,7 @@ This file is auto generated, do not modify |Aldi |MEGOS switch and dimming light remote control (141L100RC) |CR2450 | |Allegion |BE469 |4x AA | |Allegion |BE469ZP |4x AAA | +|American Power Conversion |Back-UPS ES 600M1 |Rechargable | |American Power Conversion |Back-UPS XS 1500M |Rechargable | |Aqara |Aqara Door and Window Sensor P2 |CR123A | |August |TEST200228 |4x AA | From 1c52e60ff78bd86c615f921777b6b0b954b43544 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Jan 2024 07:42:12 +0000 Subject: [PATCH 13/24] Update device: Back_UPS_XS_1500M by APC (#379) --- custom_components/battery_notes/data/library.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 7beed31cd..f2a67d8b4 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2269,6 +2269,11 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "APC", + "model": "Back-UPS XS 1500M", + "battery_type": "Rechargeable" } ] } \ No newline at end of file From d848b8a21817d66851751af5d903181adf5d6834 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Sat, 6 Jan 2024 07:42:27 +0000 Subject: [PATCH 14/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 10 +++++----- library.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index f2a67d8b4..3cfb0f248 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -171,6 +171,11 @@ "model": "Back-UPS XS 1500M", "battery_type": "Rechargable" }, + { + "manufacturer": "APC", + "model": "Back-UPS XS 1500M", + "battery_type": "Rechargeable" + }, { "manufacturer": "Aqara", "model": "Aqara Door and Window Sensor P2", @@ -2269,11 +2274,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "APC", - "model": "Back-UPS XS 1500M", - "battery_type": "Rechargeable" } ] } \ No newline at end of file diff --git a/library.md b/library.md index fd0454b26..23b34de3e 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 417 Devices in library +## 418 Devices in library This file is auto generated, do not modify @@ -35,6 +35,7 @@ This file is auto generated, do not modify |Allegion |BE469ZP |4x AAA | |American Power Conversion |Back-UPS ES 600M1 |Rechargable | |American Power Conversion |Back-UPS XS 1500M |Rechargable | +|APC |Back-UPS XS 1500M |Rechargeable | |Aqara |Aqara Door and Window Sensor P2 |CR123A | |August |TEST200228 |4x AA | |August Home Inc. |AK-R1 |2x AAA | From da85d6dfb4b37e6f9ce89fd75c289887c70301a0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Jan 2024 08:54:25 +0000 Subject: [PATCH 15/24] Update device: TS0001 by _TZ3210_j4pdtz9v (#382) Co-authored-by: iluebbe --- custom_components/battery_notes/data/library.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 3cfb0f248..6235b4c4b 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2274,6 +2274,11 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "_TZ3210_j4pdtz9v", + "model": "TS0001", + "battery_type": "CR2" } ] } \ No newline at end of file From fb8106b8fc0ee340426290730e824b9a66f85ea9 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Sat, 6 Jan 2024 08:54:44 +0000 Subject: [PATCH 16/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 10 +++++----- library.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 6235b4c4b..d9fd057ee 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -72,6 +72,11 @@ "battery_type": "AAA", "battery_quantity": 2 }, + { + "manufacturer": "_TZ3210_j4pdtz9v", + "model": "TS0001", + "battery_type": "CR2" + }, { "manufacturer": "_TZ3210_up3pngle", "model": "TS0205", @@ -2274,11 +2279,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "_TZ3210_j4pdtz9v", - "model": "TS0001", - "battery_type": "CR2" } ] } \ No newline at end of file diff --git a/library.md b/library.md index 23b34de3e..ac0b37f9f 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 418 Devices in library +## 419 Devices in library This file is auto generated, do not modify @@ -17,6 +17,7 @@ This file is auto generated, do not modify |_TZ3000_wkai4ga5 |TS0044 |CR2430 | |_TZ3000_xr3htd96 |TS0201 |2x AAA | |_TZ3000_yxqnffam |TS0203 |2x AAA | +|_TZ3210_j4pdtz9v |TS0001 |CR2 | |_TZ3210_up3pngle |TS0205 |2x AAA | |_TZE200_b6wax7g0 |TS0601 |2x AA | |_TZE200_c88teujp |TS0601 |2x AA | From 9d86faced64bb00bdf041f89614ba320288a84b0 Mon Sep 17 00:00:00 2001 From: Ajay Desai Date: Sat, 6 Jan 2024 00:57:47 -0800 Subject: [PATCH 17/24] Fixed Samsung Leak Sensor Entry (#383) * Fix Typo in Smartthings Smartthings sensor submitted with name set to smartthing without the S * Fixed Model Full Name Fixed Model Full Name --- custom_components/battery_notes/data/library.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index d9fd057ee..62c08af77 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -1486,8 +1486,8 @@ "battery_type": "CR2" }, { - "manufacturer": "Smartthing", - "model": "STS-WTR-250", + "manufacturer": "Smartthings", + "model": "Water leak sensor (2016 model) (STS-WTR-250)", "battery_type": "CR2" }, { @@ -2281,4 +2281,4 @@ "battery_type": "CR2032" } ] -} \ No newline at end of file +} From fe5e6a56e5a3a40f2e8cddefb28bd30176065028 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Sat, 6 Jan 2024 08:58:02 +0000 Subject: [PATCH 18/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 12 ++++++------ library.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 62c08af77..5e8078a1a 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -1485,11 +1485,6 @@ "model": "Compact magnetic contact sensor (AV2010/21A)", "battery_type": "CR2" }, - { - "manufacturer": "Smartthings", - "model": "Water leak sensor (2016 model) (STS-WTR-250)", - "battery_type": "CR2" - }, { "manufacturer": "SmartThings", "model": "Button (IM6001-BTP01)", @@ -1510,6 +1505,11 @@ "model": "Multipurpose sensor (2018 model) (IM6001-MPP01)", "battery_type": "CR2450" }, + { + "manufacturer": "Smartthings", + "model": "Water leak sensor (2016 model) (STS-WTR-250)", + "battery_type": "CR2" + }, { "manufacturer": "SOMFY", "model": "Sonesse 28 WF Li-Ion Roller", @@ -2281,4 +2281,4 @@ "battery_type": "CR2032" } ] -} +} \ No newline at end of file diff --git a/library.md b/library.md index ac0b37f9f..ed7ba7b4f 100644 --- a/library.md +++ b/library.md @@ -275,11 +275,11 @@ This file is auto generated, do not modify |Signify Netherlands B.V. |SML003 |2x AAA | |Siterwell |Radiator valve with thermostat (GS361A-H04) |2x AA | |SMaBiT (Bitron Video) |Compact magnetic contact sensor (AV2010/21A) |CR2 | -|Smartthing |STS-WTR-250 |CR2 | |SmartThings |Button (IM6001-BTP01) |CR2450 | |SmartThings |moisturev4 |CR2 | |SmartThings |Motion sensor (2018 model) (IM6001-MTP01) |CR2 | |SmartThings |Multipurpose sensor (2018 model) (IM6001-MPP01) |CR2450 | +|Smartthings |Water leak sensor (2016 model) (STS-WTR-250) |CR2 | |SOMFY |Sonesse 28 WF Li-Ion Roller |MANUAL | |Sonoff |Contact sensor (SNZB-04) |CR2032 | |SONOFF |Motion sensor (SNZB-03) |CR2450 | From ece0c6eecaae3deda82a93ffa686a0b3e09d6fe7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Jan 2024 08:58:22 +0000 Subject: [PATCH 19/24] Update device: Door_window_sensor_NCZ_3011_HA by Nyce (#385) Co-authored-by: ajaymdesai --- custom_components/battery_notes/data/library.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 5e8078a1a..fc726fb70 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2279,6 +2279,11 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "Nyce", + "model": "Door/window sensor (NCZ-3011-HA)", + "battery_type": "CR2032" } ] } \ No newline at end of file From 5ce3497cc624b46e9191cae354f46b28ecf9de3e Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Sat, 6 Jan 2024 08:58:40 +0000 Subject: [PATCH 20/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 10 +++++----- library.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index fc726fb70..59a83067a 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -1177,6 +1177,11 @@ "battery_type": "AAA", "battery_quantity": 2 }, + { + "manufacturer": "Nyce", + "model": "Door/window sensor (NCZ-3011-HA)", + "battery_type": "CR2032" + }, { "manufacturer": "OpenEpaperLink", "model": "ST\u2010GR16000 1.54\"", @@ -2279,11 +2284,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "Nyce", - "model": "Door/window sensor (NCZ-3011-HA)", - "battery_type": "CR2032" } ] } \ No newline at end of file diff --git a/library.md b/library.md index ed7ba7b4f..f1dec0888 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 419 Devices in library +## 420 Devices in library This file is auto generated, do not modify @@ -218,6 +218,7 @@ This file is auto generated, do not modify |Nuki |Nuki Opener |4x AAA | |Nuki |Nuki Smart Lock |4x AA | |NYCE |3043 |2x AAA | +|Nyce |Door/window sensor (NCZ-3011-HA) |CR2032 | |OpenEpaperLink |ST‐GR16000 1.54 |CR2450 | |OpenEpaperLink |ST‐GR29000 2.9 |2x CR2450 | |Oral-B |Genius X |Rechargeable | From 3e60567035aa737ec33fd1fa631fde2458037a84 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:30:57 +0000 Subject: [PATCH 21/24] Update device: FGCD001 by Fibargroup (#388) --- custom_components/battery_notes/data/library.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 59a83067a..7df9b1383 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -2284,6 +2284,11 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" + }, + { + "manufacturer": "Fibargroup", + "model": "FGCD001", + "battery_type": "CR123A" } ] } \ No newline at end of file From b5e024243e8bd0bed9201c91406379acb03f87f1 Mon Sep 17 00:00:00 2001 From: andrew-codechimp Date: Sat, 6 Jan 2024 12:31:30 +0000 Subject: [PATCH 22/24] Apply automatic changes --- custom_components/battery_notes/data/library.json | 10 +++++----- library.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/battery_notes/data/library.json b/custom_components/battery_notes/data/library.json index 7df9b1383..c944ecb78 100644 --- a/custom_components/battery_notes/data/library.json +++ b/custom_components/battery_notes/data/library.json @@ -584,6 +584,11 @@ "battery_type": "CR123A", "battery_quantity": 2 }, + { + "manufacturer": "Fibargroup", + "model": "FGCD001", + "battery_type": "CR123A" + }, { "manufacturer": "Fibargroup", "model": "FGDW002", @@ -2284,11 +2289,6 @@ "manufacturer": "Zooz", "model": "ZSE42", "battery_type": "CR2032" - }, - { - "manufacturer": "Fibargroup", - "model": "FGCD001", - "battery_type": "CR123A" } ] } \ No newline at end of file diff --git a/library.md b/library.md index f1dec0888..f5fc4ff2f 100644 --- a/library.md +++ b/library.md @@ -1,4 +1,4 @@ -## 420 Devices in library +## 421 Devices in library This file is auto generated, do not modify @@ -108,6 +108,7 @@ This file is auto generated, do not modify |eWeLink |TH01 |CR2450 | |eWeLink |WB01 |CR2450 | |Fantem |4 in 1 multi sensor (ZB003-X) |2x CR123A | +|Fibargroup |FGCD001 |CR123A | |Fibargroup |FGDW002 |ER14250 | |Fibargroup |FGFS101 |CR123A | |Fibargroup |FGFS101 |CR123A | From ebeaa4454fbf5a35cbd2fe1192c7113d0e411ea6 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Sat, 6 Jan 2024 14:06:13 +0000 Subject: [PATCH 23/24] Attribs (#389) * Add attributes to battery_type sensor * Got some debugging working --- .gitignore | 1 - .vscode/launch.json | 34 +++++++++++++++++++++++ .vscode/tasks.json | 16 +++++++++++ custom_components/battery_notes/const.py | 3 ++ custom_components/battery_notes/sensor.py | 29 +++++++++++++++++++ 5 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index 70e75e132..99f374232 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ __pycache__ # misc .coverage -.vscode coverage.xml diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..237d30bd2 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,34 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Home Assistant", + "type": "python", + "request": "launch", + "module": "homeassistant", + "justMyCode": false, + "args": [ + "--debug", + "-c", + "config" + ] + }, + { + // Example of attaching to my production server + "name": "Python: Attach Remote", + "type": "python", + "request": "attach", + "port": 5678, + "host": "localhost", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "/usr/src/homeassistant" + } + ], + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 54ba9c419..52099def7 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,5 +7,21 @@ "command": "scripts/develop", "problemMatcher": [] } + ], + "configurations": [ + { + // Example of attaching to local debug server + "name": "Python: Attach Local", + "type": "python", + "request": "attach", + "port": 5678, + "host": "localhost", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "." + } + ], + } ] } \ No newline at end of file diff --git a/custom_components/battery_notes/const.py b/custom_components/battery_notes/const.py index bf8b48bc2..225b1a0c4 100644 --- a/custom_components/battery_notes/const.py +++ b/custom_components/battery_notes/const.py @@ -49,6 +49,9 @@ ATTR_DEVICE_ID = "device_id" ATTR_DATE_TIME_REPLACED = "datetime_replaced" ATTR_REMOVE = "remove" +ATTR_BATTERY_QUANTITY = "battery_quantity" +ATTR_BATTERY_TYPE = "battery_type" + SERVICE_BATTERY_REPLACED_SCHEMA = vol.Schema( { diff --git a/custom_components/battery_notes/sensor.py b/custom_components/battery_notes/sensor.py index 3a49152c9..63a564180 100644 --- a/custom_components/battery_notes/sensor.py +++ b/custom_components/battery_notes/sensor.py @@ -4,6 +4,7 @@ from datetime import datetime from dataclasses import dataclass import voluptuous as vol +import re from homeassistant.components.sensor import ( PLATFORM_SCHEMA, @@ -43,6 +44,8 @@ LAST_REPLACED, DOMAIN_CONFIG, CONF_ENABLE_REPLACED, + ATTR_BATTERY_QUANTITY, + ATTR_BATTERY_TYPE, ) from .coordinator import BatteryNotesCoordinator @@ -243,6 +246,32 @@ def native_value(self) -> str: return self._battery_type + @property + def extra_state_attributes(self) -> dict[str, str] | None: + """Return the state attributes of the battery type.""" + + matches: re.Match = re.search( + "^(\d+)(?=x)(?:x\s)(\w+$)|([\s\S]+)", self._battery_type + ) + if matches: + _qty = matches.group(1) if matches.group(1) is not None else "1" + _type = ( + matches.group(2) if matches.group(2) is not None else matches.group(3) + ) + else: + _qty = 1 + _type = self._battery_type + + attrs = { + ATTR_BATTERY_QUANTITY: _qty, + ATTR_BATTERY_TYPE: _type, + } + + super_attrs = super().extra_state_attributes + if super_attrs: + attrs.update(super_attrs) + return attrs + class BatteryNotesLastReplacedSensor(SensorEntity, CoordinatorEntity): """Represents a battery note sensor.""" From 5846d19464c94d289e06f48fa0f0826eaa034eec Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Sat, 6 Jan 2024 14:14:38 +0000 Subject: [PATCH 24/24] Attribs (#390) * Add attributes to battery_type sensor * Got some debugging working * Declare regex as raw string --- custom_components/battery_notes/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/battery_notes/sensor.py b/custom_components/battery_notes/sensor.py index 63a564180..cd3515342 100644 --- a/custom_components/battery_notes/sensor.py +++ b/custom_components/battery_notes/sensor.py @@ -251,7 +251,7 @@ def extra_state_attributes(self) -> dict[str, str] | None: """Return the state attributes of the battery type.""" matches: re.Match = re.search( - "^(\d+)(?=x)(?:x\s)(\w+$)|([\s\S]+)", self._battery_type + r"^(\d+)(?=x)(?:x\s)(\w+$)|([\s\S]+)", self._battery_type ) if matches: _qty = matches.group(1) if matches.group(1) is not None else "1"