Răsfoiți Sursa

Add traffic strings

DebenOldert 6 luni în urmă
părinte
comite
d7e3ebc489

+ 8 - 8
custom_components/odido_klikklaar/sensor.py

@@ -120,7 +120,7 @@ DESCRIPTIONS: list[RouterSensorDescription] = [
         
     ),
     RouterSensorDescription(
-        key='eth1_downloaded',
+        key='lan1_downloaded',
         icon='mdi:download-network',
         # Reverse sent because the is what the router is sending to the port
         # thus what the port is downloading
@@ -129,11 +129,11 @@ DESCRIPTIONS: list[RouterSensorDescription] = [
         suggested_unit_of_measurement='GB',
         device_class=SensorDeviceClass.DATA_SIZE,
         state_class=SensorStateClass.TOTAL,
-        translation_key='eth1_downloaded',
+        translation_key='lan1_downloaded',
         entity_registry_enabled_default=False
     ),
     RouterSensorDescription(
-        key='eth1_uploaded',
+        key='lan1_uploaded',
         icon='mdi:upload-network',
         # Reverse receive because the is what the router is receiving to the port
         # thus what the port is uploading
@@ -142,12 +142,12 @@ DESCRIPTIONS: list[RouterSensorDescription] = [
         suggested_unit_of_measurement='GB',
         device_class=SensorDeviceClass.DATA_SIZE,
         state_class=SensorStateClass.TOTAL,
-        translation_key='eth1_uploaded',
+        translation_key='lan1_uploaded',
         entity_registry_enabled_default=False,
         
     ),
     RouterSensorDescription(
-        key='eth2_downloaded',
+        key='lan2_downloaded',
         icon='mdi:download-network',
         # Reverse sent because the is what the router is sending to the port
         # thus what the port is downloading
@@ -156,11 +156,11 @@ DESCRIPTIONS: list[RouterSensorDescription] = [
         suggested_unit_of_measurement='GB',
         device_class=SensorDeviceClass.DATA_SIZE,
         state_class=SensorStateClass.TOTAL,
-        translation_key='eth2_downloaded',
+        translation_key='lan2_downloaded',
         entity_registry_enabled_default=False
     ),
     RouterSensorDescription(
-        key='eth2_uploaded',
+        key='lan2_uploaded',
         icon='mdi:upload-network',
         # Reverse receive because the is what the router is receiving to the port
         # thus what the port is uploading
@@ -169,7 +169,7 @@ DESCRIPTIONS: list[RouterSensorDescription] = [
         suggested_unit_of_measurement='GB',
         device_class=SensorDeviceClass.DATA_SIZE,
         state_class=SensorStateClass.TOTAL,
-        translation_key='eth2_uploaded',
+        translation_key='lan2_uploaded',
         entity_registry_enabled_default=False,
         
     ),

+ 8 - 1
custom_components/odido_klikklaar/strings.json

@@ -45,7 +45,14 @@
       "rsrp": { "name": "Received Signal Received Power" },
       "sinr": { "name": "Signal To Noise Ratio" },
       "network_technology": { "name": "Network Technology" },
-      "network_band": { "name": "Network Band" }
+      "network_band": { "name": "Network Band" },
+      "wan_downloaded": { "name": "WAN total download" },
+      "wan_uploaded": { "name": "WAN total upload" },
+      "lan1_downloaded": { "name": "LAN1 total download" },
+      "lan1_uploaded": { "name": "LAN1 total upload" },
+      "lan2_downloaded": { "name": "LAN2 total download" },
+      "lan2_uploaded": { "name": "LAN2 total upload" },
+      "wan_ip_address": { "name": "External IP address" }
     }
   }
 }

+ 8 - 1
custom_components/odido_klikklaar/translations/en.json

@@ -45,7 +45,14 @@
       "rsrp": { "name": "Received Signal Received Power" },
       "sinr": { "name": "Signal To Noise Ratio" },
       "network_technology": { "name": "Network Technology" },
-      "network_band": { "name": "Network Band" }
+      "network_band": { "name": "Network Band" },
+      "wan_downloaded": { "name": "WAN total download" },
+      "wan_uploaded": { "name": "WAN total upload" },
+      "lan1_downloaded": { "name": "LAN1 total download" },
+      "lan1_uploaded": { "name": "LAN1 total upload" },
+      "lan2_downloaded": { "name": "LAN2 total download" },
+      "lan2_uploaded": { "name": "LAN2 total upload" },
+      "wan_ip_address": { "name": "External IP address" }
     }
   }
 }