Andre0512 / speedport

Home Assistant integration for Telekom Speedport
MIT License
33 stars 6 forks source link

[FEATURE] Connected devices #4

Open MelleD opened 1 year ago

MelleD commented 1 year ago

Can you output the number of connected devices in the WLAN as a sensor? Is this possible :)?

Andre0512 commented 1 year ago

Hey, I don't think we should integrate this specific evaluation as a separate sensor. This is a value generated from other values provided by this integration. I think a better approach would be to use a template sensor to get the number of connected wifi devices, try something like this:

{{ states.device_tracker|selectattr('state', 'eq', 'home')|selectattr('attributes.type', 'ne', 'lan')|list|length }}

MelleD commented 1 year ago

Ok I can try that. I think I saw it on the fritzbox integration, but let me double check :)

MelleD commented 1 year ago

Ah I see here some information :) https://www.home-assistant.io/integrations/fritz/

IMHO this could be useful, off course there are workarounds e.g. for the QR image I just safed it manually from the speedport.ip. But if I change it again, I also have to manually update it :)

It's no high priority but some ideas for long term.

MelleD commented 1 year ago

{{ states.device_tracker|selectattr('state', 'eq', 'home')|selectattr('attributes.type', 'ne', 'lan')|list|length }}

I tried this, but it's not complete the same. Here I have 46 devices connected. My Speedport status show me 49 connected devices. I haven't been able to figure out which 3 devices are missing yet.