Commit graph

656 commits

Author SHA1 Message Date
Robert Svensson
ecc431e231
Bump aiounifi to v77 (#116639) 2024-05-02 19:53:17 +02:00
wittypluck
3fd863bd7c
Unifi: enable statistics for PoE port power sensor (#116308)
Add SensorStateClass.MEASUREMENT to PoE port power sensor
2024-04-27 22:21:08 +02:00
Robert Svensson
8bf3c87336
Breakout heartbeat monitor and poe command queue in UniFi (#112529)
* Split out entity helper functionality to own class

* Split out heartbeat to own class

* Break out poe command

* Make more parts private

* Make more things private and simplify naming

* Sort initialize

* Fix ruff
2024-04-23 21:45:20 +02:00
Robert Svensson
c32961f1bc
Bump aiounifi to v76 (#116005)
* Bump aiounifi to v76
2024-04-23 07:48:25 +02:00
Kim de Vos
b69f589c30
Add bandwidth sensor for unifi device ports (#115362) 2024-04-22 22:39:46 +02:00
Robert Svensson
83370a5bde
Remove sensor exposing UniFi WLAN password (#115929) 2024-04-21 20:27:44 +02:00
wittypluck
1c0c0bb0bc
Allow manual delete of stale Unifi device from UI (#115267)
* Allow manual delete of stale device from UI

* Add unit tests for remove_config_entry_device
2024-04-21 11:08:39 +02:00
Robert Svensson
6b6324f48e
Bump aiounifi to v75 (#115819) 2024-04-19 06:36:43 +02:00
Kim de Vos
f23e48f373
Add sensor for CPU and memory utilization for unifi device (#114986)
Add system stats to unifi device sensors
2024-04-08 19:29:54 +02:00
Sid
0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Robert Svensson
9893a6c5e4
Bump aiounifi to v74 (#114649) 2024-04-02 18:33:12 +02:00
Bruno Henrique
9f9a141112
Add UniFi WLAN Password sensor (#114419)
* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Adding UniFi WLAN Password Sensor

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-30 19:49:33 +01:00
Bruno Henrique
53f262095c
Add UniFi WLAN regenerate password button (#114422)
* Adding UniFi WLAN Change Password Button

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Adding UniFi WLAN Regenerate Password Button

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-30 15:53:23 +01:00
Sid
6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Robert Svensson
03ec1798e4
Bump aiounifi to v73 (#114278) 2024-03-27 09:43:08 +01:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
efc54971d3
Update empty line formatting after module docstring (#114040) 2024-03-23 00:27:57 +01:00
Robert Svensson
bbb80caed3
Tweak marking private methods in UniFi, no need to mark inner functio… (#113964) 2024-03-22 18:10:07 +01:00
Sid
82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Robert Svensson
00361f5293
Remove unnecessary method in UniFi entity loader (#113597) 2024-03-16 18:41:00 +01:00
Joost Lekkerkerker
34b1f848c1
Add service icons to Unifi (#113360) 2024-03-14 07:04:39 +01:00
Joost Lekkerkerker
96cebdf096
Improve lists in integrations [T-U] (#113243) 2024-03-13 17:54:46 +01:00
Robert Svensson
a2180b16c3
Move wireless clients into entity_loader (#112813) 2024-03-09 11:30:01 +01:00
Robert Svensson
8b2759d810
Move restoring inactive clients method into UniFi entity loader (#112805)
* Move restoring inactive clients method into UniFi entity loader

* Use an initialize method in entity_loader
2024-03-09 10:52:59 +01:00
Robert Svensson
bf5537eb5a
Give the UniFi integration better control over what data to load (#112804) 2024-03-09 10:35:25 +01:00
Robert Svensson
19e54debba
Unifi more polish on entity description (#112281)
* Make has_entity_name default value True

* Remove previously missed event_is_on and event_to_subscribe

* Provide default value for allowed_fn and supported_fn

* Provide default value for name_fn

* Provide default value for available_fn

* Add doc strings to required functions

* Fix some missed renames from variations of controller to hub
2024-03-09 09:19:38 +01:00
Robert Svensson
f2879e6f39
Break out UniFi platform registration to its own class (#112514) 2024-03-09 09:18:23 +01:00
Paulus Schoutsen
f416d67d21
Remove built-in support for import_executor in manifest (#112725) 2024-03-08 12:02:32 -05:00
Marc Mueller
062cc4bfce
Add empty line after module docstring [t-v] (#112705) 2024-03-08 10:35:23 -05:00
Robert Svensson
7c9891fff9
Break out UniFi config handling to own class (#111325) 2024-03-05 21:36:26 +01:00
Robert Svensson
1bac51142d
Do not use list comprehension in async_add_entities in Unifi (#112435)
Do not use list comprehension in async_add_entities
2024-03-05 21:13:14 +01:00
Robert Svensson
8777606c6f
Remove callback decorator from coroutine (#112276) 2024-03-04 15:40:13 -05:00
Robert Svensson
99414d8b85
Streamline UniFi entity descriptions (#112136)
* Use kw_only=True to get rid of Mixins

* Clarify which inputs are optional and make them have default values
Add doc strings to optional inputs
2024-03-04 00:00:17 -05:00
Erik Montnemery
9ec9ac4fd4
Migrate integrations u-z to generic flowhandler (#111866) 2024-02-29 20:08:16 +01:00
Robert Svensson
8da2c53742
Bump aiounifi to v72 (#111649) 2024-02-27 20:15:33 +01:00
Robert Svensson
4281f648d2
Break out UniFi get_unifi_api function (#111323)
Break out get api function
2024-02-27 18:20:06 +01:00
J. Nick Koston
4ea1c5cc3c
Add support for importing integrations in the executor (#111336)
* Add support for pre-imports at setup time

alternative solution to #111331

* refactor

* refactor

* refactor

* mark >1.0s integrations

* no point in executor if already loaded

* no point in executor if already loaded

* cleanup

* cleanup

* two more

* one more

* analytics loads a lot more integrations

* cloud

* debug

* psutil, hardwre

* try zha

* Update homeassistant/setup.py

* await

* comments

* coverage

* coverage

* coverage

* move logic to loader

* move logic to loader

* preserve comments
2024-02-26 14:49:43 -05:00
Robert Svensson
efc89cd34f
Unifi websocket manager (#111041)
* Move hub into .hub.hub

* Move websocket to own module

* Minor shuffle
2024-02-24 16:20:59 -05:00
Robert Svensson
2f026ca963
Unifi rename controller to hub (#110976)
* Rename controller.py to hub.py

* Rename UniFiController to UnifiHub

* Rename controller instances into hub

* Rename controller to hub in tests

* Rename aiounifi Controller references to api

* Update strings

* Rename test_controller test_hub

* Narrow scope of test_remove_sensors
2024-02-20 08:51:22 +01:00
J. Nick Koston
8927769545
Migrate unifi to use async_update_reload_and_abort (#110987) 2024-02-20 07:07:55 +01:00
J. Nick Koston
1f1c66b3c2
Group adding unifi entities together to reduce number of tasks (#110965) 2024-02-19 13:58:44 -06:00
Robert Svensson
dc09633cc2
Bump aiounifi to v71 (#110658) 2024-02-15 19:17:06 +01:00
wittypluck
7d24ae88e6
Mark Unifi bandwidth sensors as unavailable when client disconnects (#109812)
* Set sensor as unavailable instead of resetting value to 0 on disconnect

* Update unit test on unavailable bandwidth sensor
2024-02-06 18:33:10 +01:00
Marc Mueller
8b0c9d3d18
Use builtin TimeoutError [t-z] (#109683) 2024-02-05 12:20:36 +01:00
Robert Svensson
30fdb2a8b3
Add log to show last received UniFi websocket message (#109167) 2024-01-31 08:46:47 +01:00
Robert Svensson
f1392f8519
Try to reconnect to UniFi on 403 (#109067) 2024-01-29 21:39:15 +01:00
Stephen Eisenhauer
a9fe63ed90
Reject unifi uptime sensor updates if time delta is small (#108464)
* Reject unifi uptime sensor updates if time delta is small

* Revise uptime change threshold tuning

* Use StateType helper

* Treat missing or zero uptime as None (unknown)
2024-01-29 20:30:07 +01:00
Robert Svensson
274d501bca
Bump aiounifi to v69 to improve websocket logging (#108265) 2024-01-17 21:33:31 -05:00
wittypluck
d94421e1a4
Reset UniFi bandwidth sensor when client misses heartbeat (#104522)
* Reset UniFi bandwidth sensor when client misses heartbeat

* Fix initialization sequence

* Code simplification: remove heartbeat_timedelta, unique_id and tracker logic

* Add unit tests

* Remove unused _is_connected attribute

* Remove redundant async_initiate_state

* Make is_connected_fn optional, heartbeat detection will only happen if not None

* Add checks on is_connected_fn
2024-01-14 15:19:43 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00