zachcheatham / ha-omada

Home Assistant TP-Link Omada Integration
186 stars 26 forks source link

all entities are "Device_tracker" and they should not be. #103

Closed Shredder5262 closed 2 months ago

Shredder5262 commented 2 months ago

The title is pretty much self explanatory. I was trying to add some network entities to a bar card today and could not because these entities use attributes for data points instead of being sensors. This would mean that i would have to convert 80+ entity attributes to template sensors....which makes this integration unusable. I asked the folks on the Home assistant discord for assistance on why the bar card was not producing desired results and it essentially is because these entities are device trackers instead of normal sensors, device_tracker is used for location and that is all and therefore they refuse to assist at this point. Please update this integration to be normal sensors instead of device tracker entities.

zachcheatham commented 2 months ago

Can you let us know which device attributes you are referring to? Not all of the entities provided by this integration are device_tracker...

Shredder5262 commented 2 months ago

Anything that is a network device on the network is a 'device tracker' entity....and this isn't even a complete list. the specific attribute that i was trying to reference for the bar card i was making is the RSSI attribute. In my experience if this item is an attribute then some things will work and some things will not on the bar card. I was not able to get 'severity' to work, but if i used a different sensor that was a number, then severity works.

2024-05-08 10_42_18-Settings – Home Assistant - Vivaldi

Example bar card working with normal sensor (showing red as a severity level)

2024-05-08 20_24_26-Andrew Overview Dashboard – Home Assistant - Vivaldi

Example of bar card with device tracker entity and referencing attribute (should show gold, but doesn't work) 2024-05-08 20_28_26-Andrew Overview Dashboard – Home Assistant - Vivaldi

zachcheatham commented 2 months ago

Okay, I see the confusion. It is correct behavior that these entities are device trackers. What you are asking for is that the rssi, cpu load, and maybe other attributes be migrated to additional sensors. Could you please update the issue with that clarification?

Shredder5262 commented 2 months ago

I don't know where you are getting that I am asking for a cpu load sensor to be migrated? I am talking about the RSSI attribute. That is an attribute of a device_tracker. If you are saying that 'device_tracker' is the correct entity type to use, then please explain that to the folks on the Home assistant discord channel, they disagree that the purpose of device tracker is not for this purpose.
That said, my issue still stands of not being able to reference the rssi attribute while it is still an attribute and not an entity.

zachcheatham commented 2 months ago

So, to be clear-- you want the RSSI attribute of a device_tracker entity to be its own sensor entity? Could you please open a feature request for this?

Shredder5262 commented 2 months ago

So, to be clear-- you want the RSSI attribute of a device_tracker entity to be its own sensor entity? Could you please open a feature request for this?

at the very least, yes. The other attributes should probably be their own sensors as well, but this is a start. i can open the feature request.

Shredder5262 commented 2 months ago

Feature request opened: https://github.com/zachcheatham/ha-omada/issues/104

Shredder5262 commented 2 months ago

Why was this closed? You need to consult with the folks on the HA discord about this, according to them these are not proper device sensors.

zachcheatham commented 2 months ago

This was closed in lieu of #104. The integration is properly providing device tracker entities as intended: https://www.home-assistant.io/integrations/device_tracker/

Shredder5262 commented 2 months ago

This was closed in lieu of #104. The integration is properly providing device tracker entities as intended: https://www.home-assistant.io/integrations/device_tracker/

ok, cool then, There still seems to be an opinionated disconnect in the community on what a "device tracker" is though... I'm not sure who's correct...and I don't really care, tbh, but if you're moving the RSSI thing to be a sensor instead, then i appreciate it. Thank you.

zachcheatham commented 2 months ago

Yeah, I'm not quite sure what they're trying to say. This integration is very similar to the Unifi integration provided by Home Assistant. I had been meaning to migrate statistics to their own sensors for a little while anyways and now I can check it off the list :) Thanks for the input to the project!