From 232b19ac06137178ab88ad38ed5a023742255e3b Mon Sep 17 00:00:00 2001 From: Elad Bar Date: Sat, 4 May 2024 11:23:23 +0300 Subject: [PATCH] Re-add interface status (Binary Sensor and Switch) #135 --- CHANGELOG.md | 4 ++++ custom_components/edgeos/common/entity_descriptions.py | 9 ++++++++- custom_components/edgeos/manifest.json | 2 +- custom_components/edgeos/strings.json | 3 +++ custom_components/edgeos/translations/en.json | 3 +++ custom_components/edgeos/translations/nb.json | 3 +++ custom_components/edgeos/translations/pt-BR.json | 3 +++ 7 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 003d820..57d8649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.1.2 + +- Re-add interface status (Binary Sensor and Switch) [#135](https://github.com/elad-bar/ha-edgeos/issues/135) + ## 2.1.1 - Fix interface received rate sensor [#133](https://github.com/elad-bar/ha-edgeos/issues/133) diff --git a/custom_components/edgeos/common/entity_descriptions.py b/custom_components/edgeos/common/entity_descriptions.py index 4444c31..bfc18d1 100644 --- a/custom_components/edgeos/common/entity_descriptions.py +++ b/custom_components/edgeos/common/entity_descriptions.py @@ -231,8 +231,15 @@ class IntegrationNumberEntityDescription( icon="mdi:monitor-eye", device_type=DeviceTypes.INTERFACE, ), + IntegrationBinarySensorEntityDescription( + key=EntityKeys.INTERFACE_STATUS, + icon="mdi:monitor-eye", + device_type=DeviceTypes.INTERFACE, + ), IntegrationSwitchEntityDescription( - key=EntityKeys.INTERFACE_STATUS, icon="mdi:monitor-eye" + key=EntityKeys.INTERFACE_STATUS, + icon="mdi:monitor-eye", + device_type=DeviceTypes.INTERFACE, ), IntegrationSensorEntityDescription( key=EntityKeys.DEVICE_RECEIVED_RATE, diff --git a/custom_components/edgeos/manifest.json b/custom_components/edgeos/manifest.json index 0cdbc22..70d9a94 100644 --- a/custom_components/edgeos/manifest.json +++ b/custom_components/edgeos/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/elad-bar/ha-edgeos/issues", "requirements": ["aiohttp"], - "version": "2.1.1" + "version": "2.1.2" } diff --git a/custom_components/edgeos/strings.json b/custom_components/edgeos/strings.json index b25b689..8996732 100644 --- a/custom_components/edgeos/strings.json +++ b/custom_components/edgeos/strings.json @@ -56,6 +56,9 @@ }, "interface_connected": { "name": "Connected" + }, + "interface_status": { + "name": "Status" } }, "device_tracker": { diff --git a/custom_components/edgeos/translations/en.json b/custom_components/edgeos/translations/en.json index 4135dc8..43e62da 100644 --- a/custom_components/edgeos/translations/en.json +++ b/custom_components/edgeos/translations/en.json @@ -32,6 +32,9 @@ }, "interface_connected": { "name": "Connected" + }, + "interface_status": { + "name": "Status" } }, "device_tracker": { diff --git a/custom_components/edgeos/translations/nb.json b/custom_components/edgeos/translations/nb.json index 21eee0c..5f81215 100644 --- a/custom_components/edgeos/translations/nb.json +++ b/custom_components/edgeos/translations/nb.json @@ -32,6 +32,9 @@ }, "interface_connected": { "name": "Tilkoblet" + }, + "interface_status": { + "name": "Status" } }, "device_tracker": { diff --git a/custom_components/edgeos/translations/pt-BR.json b/custom_components/edgeos/translations/pt-BR.json index 10cde6b..c5e6d2e 100644 --- a/custom_components/edgeos/translations/pt-BR.json +++ b/custom_components/edgeos/translations/pt-BR.json @@ -32,6 +32,9 @@ }, "interface_connected": { "name": "Conectada Conectado" + }, + "interface_status": { + "name": "Status" } }, "device_tracker": {