Skip to content

Commit

Permalink
Added down_speed and up_speed for Deco
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrErohin committed May 20, 2024
1 parent 81a9abf commit 6efecca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ To do that:
- Archer AX21 v1.20
- Archer AX23 v1.0
- Archer AX50 v1.0
- Archer AX53 v2
- Archer AX55 v1.0
- Archer AX55 V1.60
- Archer AX72 V1
Expand Down
7 changes: 5 additions & 2 deletions custom_components/tplink_router/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,16 @@ def icon(self) -> str:

@property
def extra_state_attributes(self) -> dict[str, str]:
"""Return the attributes."""
return {
attributes = {
'connection': self.device.type.get_type(),
'band': self.device.type.get_band(),
'packets_sent': self.device.packets_sent,
'packets_received': self.device.packets_received
}
if self.device.down_speed is not None or self.device.up_speed is not None:
attributes['up_speed'] = self.device.up_speed
attributes['down_speed'] = self.device.down_speed
return attributes

@property
def entity_registry_enabled_default(self) -> bool:
Expand Down
4 changes: 2 additions & 2 deletions custom_components/tplink_router/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"documentation": "https://github.com/AlexandrErohin/home-assistant-tplink-router",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/AlexandrErohin/home-assistant-tplink-router/issues",
"requirements": ["tplinkrouterc6u==4.0.2"],
"version": "1.13.3"
"requirements": ["tplinkrouterc6u==4.1.0"],
"version": "1.14.0"
}

0 comments on commit 6efecca

Please sign in to comment.