Andre0512 / speedport

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

[FEATURE] Connected devices #4

Open MelleD opened 10 months ago

MelleD commented 10 months ago

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

Andre0512 commented 10 months 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 10 months ago

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

MelleD commented 10 months 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 10 months 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.