Closed h3llrais3r closed 2 months ago
Let me know if this is ok, or any changes are required.
I'm also not sure why yet, but I cannot get this new sensor to appear in my environment. I see the value fn running, but no entity exists. I'll let you know if I find the problem.
I've just retried by re-adding the integration from scratch, but I directly see the sensor sensor.omada_controller_clients
.
Let me know if changes are ok or more changes are required. 😉
Sorry for the delay on this, I haven't had much time to debug and I'm still trying to get it to work. I've tried with a fresh install of home assistant and the entity is still not being added. Every time I restart the instance I can see Registered new sensor.omada entity: sensor.cheatham_clients
but it does not appear in the entity list or under the Controller's device. I'm not sure if this is a bug in home assistant or some other issue. I do not see any errors, just no entity appearing.
I ended up finding the issue. The sensor was immediately being removed by restore_cleanup_platform_entities
as it did not have a mac associated with it (as it shouldn't.) I'm going to go ahead and accept this and then make the fix to the cleanup function. Thanks again for the contributions!
I ended up finding the issue. The sensor was immediately being removed by
restore_cleanup_platform_entities
as it did not have a mac associated with it (as it shouldn't.)
Strange that I didn't had the same behavior. I was running it on a dev environment (clean setup with devcontainer). Anyway, it's a good thing that you found it. Thanks for accepting the PR's. 😉
EDIT: I've just installed version 0.6.0-beta.1
and it works perfectly.
Add a connected clients sensor that contains the total number of connected clients. It also includes the list of clients (mac, name, ip) in the![image](https://github.com/zachcheatham/ha-omada/assets/1945295/637dd121-7c9d-4e02-bbeb-b5d6cf8e81ea)
clients
attribute of the sensor. Example: