Improve unifi device tracker performance (#37308)
Improve unifi device tracker performance (#37308)

* Improve unifi device tracker performance

The unifi websocket sends an update every second
which generates a significant amount of state
changed updates.

Avoid creating callback functions when they
are not going to be used.

* make _no_heartbeat/_make_disconnected instance methods

* remove extra empty line

* revert is_wired change

* remove extra line
balloob/home-assistant,home-assistant/home-assistant,tboyce1/home-assistant,nkgilley/home-assistant,sdague/home-assistant,GenericStudent/home-assistant,lukas-hetzenecker/home-assistant,soldag/home-assistant,jawilson/home-assistant,GenericStudent/home-assistant,tboyce1/home-assistant,w1ll1am23/home-assistant,sander76/home-assistant,jawilson/home-assistant,kennedyshead/home-assistant,home-assistant/home-assistant,sdague/home-assistant,tboyce021/home-assistant,mKeRix/home-assistant,Danielhiversen/home-assistant,pschmitt/home-assistant,soldag/home-assistant,titilambert/home-assistant,tchellomello/home-assistant,rohitranjan1991/home-assistant,mKeRix/home-assistant,balloob/home-assistant,aronsky/home-assistant,mezz64/home-assistant,lukas-hetzenecker/home-assistant,titilambert/home-assistant,mKeRix/home-assistant,FreekingDean/home-assistant,nkgilley/home-assistant,w1ll1am23/home-assistant,FreekingDean/home-assistant,mezz64/home-assistant,toddeye/home-assistant,rohitranjan1991/home-assistant,balloob/home-assistant,tboyce1/home-assistant,tboyce021/home-assistant,mKeRix/home-assistant,tchellomello/home-assistant,adrienbrault/home-assistant,partofthething/home-assistant,partofthething/home-assistant,turbokongen/home-assistant,turbokongen/home-assistant,sander76/home-assistant,Danielhiversen/home-assistant,tboyce1/home-assistant,kennedyshead/home-assistant,aronsky/home-assistant,rohitranjan1991/home-assistant,toddeye/home-assistant,adrienbrault/home-assistant,pschmitt/home-assistant