ha-tplink-deco
ha-tplink-deco copied to clipboard
Data incorrect when the device is disconnected.
Here, the device is disconnected, the connection_type is wired? The deco_device is null, which is correct. (could it be not_connected?)
and here, the device is also disconnected, but the connection_type is band5.
So, probably the connection_type needs to be cleared if the device is not connected?
Hmm, you are correct that the value could be considered inaccurate since there's no actual connection, but I think there is some value in showing the last value. For example:
- You can determine which clients are wired, 2.4G or 5G connected even if they are offline. This can sometimes be useful for identifying mystery devices whose name is not clear.
You could also argue that ip_address
is inaccurate, since when a device is not connected, it doesn't actually have an IP address. But it can be useful to know the last assigned IP.
I lean towards keeping the lat values rather than showing null, but interested in hearing what others think. Is this particularly causing you problems? How difficult is it for you to work around it by doing a condition on whether the device is present?
For ip_address
, there is a chance that it might get assigned the same IP if that IP address is reserved.
But there is no guarantee that the device would be connected to the same band when reconnected. (unless they are ESP based smart devices, which only connect to 2.4. Whole other discussion :D )
I agree having the last value is sometimes useful, but it kind of does not add any value in having the last connected band?
May be last connected Deco, yes. Last connected IP, probably?
PS: Totally unrelated, for the first image, it is a phone, and I haven't connected it using Ethernet, not sure why it says wired?
Agree that band is less guranteed, though I think it's actually fairly likely that stationary devices reconnect on the same band (e.g. TV, xbox, or computers).
Also wired
value can be useful and since the band is set in the same connection_type
property, it think it's simpler to treat it the same.
PS: Totally unrelated, for the first image, it is a phone, and I haven't connected it using Ethernet, not sure why it says wired?
That's interesting about the phone showing wired
incorrectly for the connection_type
. I'm unable to repro when turning my phone on and off.
Agree that band is less guranteed, though I think it's actually fairly likely that stationary devices reconnect on the same band (e.g. TV, xbox, or computers).
But in fairness, people might not use this feature to track stationary devices? 😃
Is this particularly causing you problems? How difficult is it for you to work around it by doing a condition on whether the device is present?
I wouldn't say difficult, but it is kind of inconsistent, don't you think? I am using a template in Markdown to give me details about a bunch of phones, which floor of the house they are in.
{{ states.device_tracker.galaxy_s8.attributes.deco_device | replace("living_room"," Living Room") }} - {{ states.device_tracker.galaxy_s8.attributes.connection_type | replace("band","") | replace("5","5 GHz")| replace("2_4","2.4 GHz") }}
If the device is disconnected, it shows the deco connected as "none" which is okay. but still shows the band it is connected to.
I would just have to write a condition
{% if is_state('device_tracker.galaxy_s8', 'home') %} {{states.device_tracker.galaxy_s8.attributes.deco_device | replace("living_room"," Living Room") }} - {{ states.device_tracker.galaxy_s8.attributes.connection_type | replace("band","") | replace("5","5 GHz")| replace("2_4","2.4 GHz")}} {% else %} Not Connected {% endif %}
Hello I'm reopening this discussion. From my point of view if a device is offline it should not be attached to a router. the attribute deco_device should be null. I saw your earlier discussion and I understand why to keep a kind of memory about the device.
In my case I'm trying to recreate a map of device with conditional card (The Entity Filter card). I need two filters 1/ online or offline 2/ which deco device
The Entity Filter card can't combine two filters with an AND but only with a OR. In conclusion I need an attribute that can show these two states in one attribute (null, deco1, deco2, deco3 ...)
Thank for reading Have nice day