Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: total kB/s Up and Down per Deco device #166

Closed
Verguldebarman opened this issue Mar 9, 2023 · 2 comments
Closed

Idea: total kB/s Up and Down per Deco device #166

Verguldebarman opened this issue Mar 9, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Verguldebarman
Copy link

I have created several template sensors in HA to show the total Up- and Downstream in kB/s per Deco device. Perhaps this is an idea to add into te integration.

Template Sensor looks like this for total Upload for <deco_name>:

- platform: template
  sensors:
    deco_<deco_name>_up:
      friendly_name: "Deco <deco_name> Upload kB/s"
      icon_template: mdi:server-network      
      unit_of_measurement: kB/s
      value_template: |
        {% set ns = namespace(result=0) %}
        {% set array = integration_entities('tplink_deco') | list %} 
        {% for a in array if state_attr(a, 'deco_device') == '<deco_name>'%}
        {% set ns.result = ns.result + state_attr(a, 'up_kilobytes_per_s') %}
        {% endfor %}
        {{ ns.result}}

Same template sensor for Download (so 'down_kilobytes_per_s') and for all Deco's you have. So in my case; I have 3 Deco devices, so 6 sensors in total.

@amosyuen amosyuen added the enhancement New feature or request label Apr 23, 2023
@kaosmagix
Copy link

I would like this feature. However if possible it would be best to retrieve the up/down of the Deco Unit itself instead of calculating it based on the clients.
For the main unit I retrieve the total up/down by the uPNP/IGD integration, but it would be nice not to need an additional integration

@amosyuen
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants