Commit graph

691 commits

Author SHA1 Message Date
epenet
03d5b18974
Remove options property from OptionFlow (#129890)
* Remove options property from OptionFlow

* Update test_config_entries.py

* Partial revert of "Remove deprecated property setters in option flows (#129773)"

* Partial revert "Use new helper properties in crownstone options flow (#129774)"

* Restore onewire init

* Restore onvif

* Restore roborock

* Use deepcopy in onewire

* Restore steam_online

* Restore initial options property in OptionsFlowWithConfigEntry

* re-add options property in SchemaOptionsFlowHandler

* Restore test

* Cleanup
2024-11-06 23:28:01 +01:00
epenet
6d561a9796
Remove deprecated property setters in option flows (#129773) 2024-11-04 14:21:26 +01:00
epenet
ca6b759607
Use new reauth helpers in unifi (#128837)
* Use new reauth helpers in unifi

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update config_flow.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-21 22:25:10 +02:00
Michael Schäfer
c5f8d823ce
Add missing translation string in unifi (#128062)
Add missing translation string in unigi
2024-10-15 20:23:26 +02:00
J. Nick Koston
0f29fd3e10
Switch to using fast cached_property implementation in propcache (#127339) 2024-10-03 13:11:02 -05:00
Jan Rieger
cda62a4ff3
Add missing icons to unifi (#126934) 2024-09-27 18:50:00 +02:00
Jan Rieger
2d68f9a986
Use icon translations in unifi (#126903)
* Use icon translations in unifi

* Update snapshots

* Add state icons

* Address feedback

* Update snapshot
2024-09-27 17:43:25 +02:00
epenet
1adaaf49cc
Add specific EntityDescription to describe device tracker entities (#126586)
* Add TrackerEntityDescription to describe tracker entities

* Improve

* Adjust components

* Add ScannerEntityDescription

* Simplify

* Revert

* Set TrackerEntity default source type to SourceType.GPS

* Fix rebase

* Adjust default

* Remove source_type from EntityDescription

* Fix rebase

* Docstring

* Remove BaseTrackerEntityDescription
2024-09-25 07:28:29 +02:00
epenet
3995d001ec
Set default source_type on TrackerEntity and ScannerEntity (#126648)
* Set default source_type on TrackerEntity and ScannerEntity

* Add samples

* Two more

* Adjust tests
2024-09-24 20:56:01 +02:00
epenet
0281e95f2e
Prefer __all__ over F401 ignore (#126189) 2024-09-18 11:29:23 +02:00
epenet
ce4a62574a
Add alias to DOMAIN import (part 1) (#125560)
* Add alias to DOMAIN import (part 1)

* Revert tomato/xiaomi
2024-09-09 22:05:27 +02:00
epenet
e750f8f457
Add alias to DOMAIN import (part 4) (#125563)
* Add alias to DOMAIN import (part 4)

* Simplify

* More integration

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Revert "Apply suggestions from code review"

This reverts commit 07471d3629.

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-09-09 21:32:33 +02:00
Erik Montnemery
38ef216894
Update icons.json to new service schema part 4 (#124771) 2024-08-28 13:48:13 +02:00
Ian
d99f1631ca
Add Uplink info to UniFi Device tracker attributes (#123032)
Add device uplink mac sensor
2024-08-20 07:57:03 +02:00
Kim de Vos
a8a7d01a84
Add temperature sensors for unifi device (#122518)
* Add temperature sensors for device

* Move to single line

* Use right reference

* Always return a value

* Update tests

* Use slugify for id name

* Return default value if not present

* Make _device_temperature return value

* Add default value if temperatures is None

* Set value to go over all code paths

* Add test for no matching temperatures

* make first part deterministic
2024-08-16 21:37:24 +02:00
Robert Svensson
a944541c58
Bump aiounifi to v80 (#124004) 2024-08-15 21:36:06 -05:00
Kim de Vos
eb5ee1ffd1
Use slugify to create id for UniFi WAN latency (#123108)
Use slugify to create id for latency
2024-08-03 15:08:01 +02:00
bdowden
18a7d15d14
Add Traffic Rule switches to UniFi Network (#118821)
* Add Traffic Rule switches to UniFi Network

* Retrieve Fix unifi traffic rule switches

Poll for traffic rule updates; have immediate feedback in the UI for modifying traffic rules

* Remove default values for unifi entity; Remove unnecessary code

* Begin updating traffic rule unit tests

* For the mock get request, allow for meta and data properties to not be appended to support v2 api requests

Fix traffic rule unit tests;

* inspect path to determine json response instead of passing an argument

* Remove entity id parameter from tests; remove unused code; rename traffic rule unique ID prefix

* Remove parameter with default.

* More code removal;

* Rename copy/paste variable; remove commented code; remove duplicate default code

---------

Co-authored-by: ViViDboarder <ViViDboarder@gmail.com>
2024-07-30 17:26:08 +02:00
Kim de Vos
896cd27bea
Add sensors for Unifi latency (#116737)
* Add sensors for Unifi latency

* Add needed guard and casting

* Use new types

* Add WAN2 support

* Add literals

* Make ids for WAN and WAN2 unique

* Make methods general

* Update sensor.py

* add more typing

* Simplify usage make_wan_latency_sensors

* Simplify further

* Move latency entity creation to method

* Make method internal

* simplify tests

* Apply feedback

* Reduce boiler copied code and add support function

* Add external method for share logic between

* Remove none

* Add more tests

* Apply feedback and change code to improve code coverage
2024-07-30 17:20:56 +02:00
J. Nick Koston
482cf261c0
Small speedups to unifi (#122684)
- Use a set for event_is_on to avoid linear search
- Avoid many duplicate property lookups
2024-07-27 10:19:53 +02:00
J. Nick Koston
1a5706a693
Cache unifi device_tracker properties that never change (#122683) 2024-07-27 10:14:40 +02:00
Robert Svensson
aeabe3ab95
Mark UniFi power cycle button as unavailable if PoE is not enabled on port (#122035) 2024-07-16 20:16:36 +02:00
Robert Svensson
61111f5d71
Fix bad access to UniFi runtime_data when not assigned (#121725)
* Fix bad access to runtime_data when not assigned

* Fix review comment

* Clean up if statements
2024-07-10 23:53:11 +02:00
wittypluck
3549aaf69c
Reject small uptime updates for Unifi clients (#120398)
Extend logic to reject small uptime updates to Unifi clients + add unit tests
2024-06-28 22:47:20 +02:00
Joost Lekkerkerker
6ef8e87f88
Fix ruff redefined-argument-from-local PLR1704 (#120729)
* Fix PLR1704

* Fix
2024-06-28 12:31:07 +02:00
J. Nick Koston
0c910bc000
Add newer models to unifi integrations discovery (#120688) 2024-06-27 19:20:37 +02:00
wittypluck
0a30032b96
Enable statistics for UniFi remaining power sensors (#120073)
Unifi: Add StateClass Measurement to all power sensors
2024-06-22 10:31:20 +02:00
Robert Svensson
6fb5a12ef1
Make UniFi services handle unloaded config entry (#120028) 2024-06-21 10:36:52 +02:00
Robert Svensson
87e405396b
Bump aiounifi to v79 (#120033) 2024-06-20 20:12:40 +02:00
Robert Svensson
707e422a31
Add UniFi sensor for number of clients connected to a device (#119509)
Co-authored-by: Kim de Vos <kim.de.vos@vippsmobilepay.com>
2024-06-12 18:20:31 +02:00
Robert Svensson
c9911e4dd4
Rework UniFi tests to not use runtime data (#119202) 2024-06-09 15:56:26 +02:00
epenet
e7ce01e649
Enforce namespace import in components (#118218) 2024-05-27 12:50:11 +02:00
Robert Svensson
a7938091bf
Use fixtures to setup UniFi config entries (#118126) 2024-05-26 16:30:22 +02:00
Marc Mueller
44049c34f9
Use PEP 695 type alias for ConfigEntry types (#117632) 2024-05-17 15:42:58 +02:00
Robert Svensson
fa815234be
Make UniFi use runtime data (#117457) 2024-05-14 21:04:26 +02:00
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