Closed Greminn closed 3 months ago
Just to explain the difference and understand what you are suggesting, leaving aside icons suggestion which make sense, for interface: Monitored switch - whether to create entities of interface metrics, thinking whether Status and connected should be excluded or not, today, if monitored is off, you will not see the connected binary sensor.
Status switch - provides functionality of enable / disable interface
Status binary sensor - provides visibility whether the interface is enabled or not, same as the switch, need to consider whether it should be removed or not.
Connected binary sensor - provides visibility whether it is connected, applicable for physical interfaces only (switch / ethernet / wan) but available for all as the API provides connected state for non-physical interfaces.
what is your suggestion?
thanks
Thanks for the info. It was mainly to point out that you had two entities called Switch with the same icon. So could be a bit confusing for users that didn't understand the above, so consider re-naming one to better show the usage.
while working on it, I got remembered the reason for having the status for switch and binary sensor, switch is available only when the user has admin rights - because that action in the router / switch requires that permission level, binary sensor is just indication whether the interface is activated or not.
I will remain the name as is, will make it work according to the logic above, and it will not be duplicated nor breaking the integration for those already using it as status
Closing as it was fixed
Just a little improvement suggestion here. You have "Status" as a Binary Sensor, and "Status" as a Switch... change switch.ubnt_interface_ethX_status icon to mdi:ethernet or mdi:toggle-switch-variant-off so its clearer that its an actual switch that controls the port and maybe rename the Switch from "Status" to "Switch" or "Port Switch" or something similar? I can't figure out what it would be better than those two... :)
Keep up the great work!
Here is how the Ubiquiti integration does it...