Commit Graph

119 Commits (5c018f6ffceefd02f0f42779c2348e802a7e0541)

Author SHA1 Message Date
epenet 0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
Joost Lekkerkerker 9b41e3d124
Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
Robert Svensson 05d40fbc4c
Bump axis to v60 (#114544)
* Improve Axis MQTT support

* Bump axis to v60
2024-04-01 00:24:41 +02: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
Robert Svensson c1e1db9863
Adapt to Axis library file structure changes (#114181)
* Adapt to axis library file structure changes

* Bump axis to v59
2024-03-25 12:16:41 -04:00
Robert Svensson 2e2b40f77e
Add reconfigure flow to Axis integration (#114067) 2024-03-24 12:48:19 +01:00
J. Nick Koston 4f18f0d902
Fix setup timings when config entry platform loads are not awaited (#113959)
* Move setup time logging into the context manager

We were fetching the time twice but since the context
manager already has the timing, move it there

* remove log setup assertions from integration test

* tweak logging to give us better data for tracking issues

* redundant

* adjust

* preen

* fixes

* adjust

* make api change internal so nobody uses it

* coverage

* fix test

* fix more tests

* coverage

* more tests assuming internal calls

* fix more

* adjust

* adjust

* fix axis tests

* fix broadlink -- it does not call async_forward_entry_setup

* missed some

* remove useless patch

* rename, detect it both ways

* clear

* debug

* try to fix

* handle phase finishing out while paused

* where its set does not need to know its late as that is an implemenation detail of setup

* where its set does not need to know its late as that is an implemenation detail of setup

* tweak

* simplify

* reduce complexity

* revert order change as it makes review harder

* revert naming changes as it makes review harder

* improve comment

* improve debug

* late dispatch test

* test the other way as well

* Update setup.py

* Update setup.py

* Update setup.py

* simplify

* reduce
2024-03-23 15:26:38 -04:00
Robert Svensson bf8d880e5f
Improve axis tests (#114035)
* Combine binary sensor tests into more logical groups

* Improve light tests

* Clean up switch tests

* Improve typing in conftest

* Add typing to camera

* Improve binary sensor

* Improve light

* Improve switch
2024-03-23 00:44:06 +01:00
Robert Svensson a9e857202d
Axis use entity descripton binary sensor platform (#113705) 2024-03-22 15:49:51 +01:00
Robert Svensson 5b5ff92a05
Support configuring Axis to use HTTPS (#113271) 2024-03-15 18:58:49 +01:00
Robert Svensson c761b825ec
Fix Axis unique ID (#112132) 2024-03-12 21:01:20 +01:00
Robert Svensson 020b656f51
Split out Axis config data (#112825)
Split out config data
2024-03-09 13:00:25 -05:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Robert Svensson ec8d23d0af
Fix places not changed to hub in Axis tests (#112128) 2024-03-03 20:45:06 -05:00
Robert Svensson 4eb24b2db7
Clean up setup and teardown of Axis integration (#112120) 2024-03-03 12:42:44 -05:00
Robert Svensson ece5587e1f
Streamline naming in the Axis integration (#112044)
* Rename device.py to hub.py

* Rename AxisNetworkDevice to AxisHub

* Move hub.py into hub package

* Rename get_axis_device to get_axis_api

* Split out get_axis_api to its own module

* Rename device object to hub

* Rename device to api in config flow

* Convenience method to get hub
2024-03-02 11:32:51 -05:00
Robert Svensson 458391ee2b
Axis improve coverage binary tests (#111758)
* Parametrize binary sensor tests

* Add test coverage to the different *guard apps

* Add object analytics tests
2024-02-28 23:14:50 -05:00
Robert Svensson c478b1416c
Adapt Axis integration to library refactoring (#110898)
* Adapt Axis integration to library refactoring

* Bump axis to v49
2024-02-28 14:36:32 +01:00
J. Nick Koston 8da07f1bf2
Fix formatting of mac addresses from dhcp discovery mocking in axis (#110560)
dhcp returns addresses in lowercase without :
2024-02-14 20:37:31 -05:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Franck Nijhof 04e0e2bd75
Update a* tests to use device & entity registry fixtures (#103711) 2023-11-09 20:46:20 +01:00
J. Nick Koston 0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Joost Lekkerkerker 82e92cdf82
Use snapshot assertion for Axis diagnostics test (#98902) 2023-08-23 21:36:18 +02:00
Robert Svensson 1552319e94
Add Axis camera sources to diagnostics (#97063) 2023-07-23 17:56:58 +02:00
epenet 7b3a932cd9
Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
epenet 30884f6d17
Add missing mock in axis config flow tests (#89365) 2023-03-08 09:38:55 +01:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 0cf5e9fb4a
Add type hints to integration tests (part 2) (#87789)
* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
2023-02-10 16:05:26 +01:00
epenet 2545694d41
Add type hints to integration tests (a) (#87684)
* Add type hints to accuweather tests

* Adjust a** components

* Adjust aiohttp_client

* ClientSessionGenerator/WebSocketGenerator
2023-02-08 12:16:23 +01:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Franck Nijhof ef800335fb
Enable Ruff PT022 (#86792)
* Enable Ruff PT022

* Adjust found cases
2023-01-27 13:57:06 +01:00
Franck Nijhof 62dcbe5258
Enable Ruff PT001 (#86730) 2023-01-26 18:05:05 +01:00
Robert Svensson 4181a9baf0
Improve Axis config flow tests (#86644)
* Improve Axis config flow tests

* Don't use prepare_config_entry
2023-01-26 14:29:06 +01:00
Robert Svensson a56f6cb863
Assert Axis config entry state not hass.data (#86648) 2023-01-25 21:15:03 +01:00
Robert Svensson 332d3e0f19
Use fixtures to setup Axis integration in tests (#86034)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-22 17:33:40 +01:00
Franck Nijhof 24fdd588fd
Code styling tweaks to the tests - Part 1 (#86192) 2023-01-20 13:52:46 +01:00
Robert Svensson e43802eb07
Use more _attrs_* in Axis entities (#85555)
* Use _attr_available

* Use _attr_is_on

* Use _attr_name

* Make some values private

* Update names of axis entity base classes

* Fix review comments
2023-01-18 17:27:13 +01:00
Robert Svensson 8117f4af3a
Use parametrize to modify Axis test fixtures (#85884) 2023-01-15 04:12:03 +01:00
Robert Svensson 768c3e163d
Create and use config_entry fixture for Axis integration tests (#85865) 2023-01-14 14:18:18 +02:00
Robert Svensson be899b6ab6
Store Axis device with entry_id key rather than unique_id (#85673)
* Store Axis device with entry_id key rather than unique_id

* Fix review comments
2023-01-13 22:21:40 +01:00
Robert Svensson 7953c4a6d5
Clean up old config migration of Axis config (#85671)
* Revert Axis config flow version to 1

* Set up using hass.config_entries.async_setup

* Fix review comment

* Update homeassistant/components/axis/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-13 17:12:51 +01:00
Robert Svensson 1cdd535f21
Bump axis to v46 (#85431) 2023-01-09 12:43:40 +01:00
Robert Svensson 534bb74069
Bump axis to v45 (#84992) 2023-01-02 18:14:14 +01:00
Robert Svensson c16db4c3e1
Make Axis utilise forward_entry_setups (#75178) 2022-07-28 11:41:03 +02:00
Robert Svensson ef6fd78ede
Use FlowResultType in Axis config flow tests (#74496) 2022-07-06 09:54:26 +02:00
epenet a29990a784
Use new CONF_MODEL core constant (1/3) (#68829)
* Use CONF_MODEL in axis

* Use CONF_MODEL in denonavr

* Use CONF_MODEL in flux_led

* Use CONF_MODEL in konnected

* Use CONF_MODEL in steamist

* Use CONF_MODEL in tellstick

* Use CONF_MODEL in tensorflow

* Use CONF_MODEL in twinkly

* Use CONF_MODEL in yeelight

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-29 11:11:58 +02:00
Joshua Roys 9134e5c844
Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
Robert Svensson 1b46575f29
Add diagnostics support to Axis integration (#64637)
* Add diagnostics support to Axis integration

* Remove system info

* Redact sensitive information

* Store whole config entry

* Redact username

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2022-01-23 22:52:08 +01:00
Robert Svensson 1551da33ac
Expose Axis device configuration url from discovered entry (#64517) 2022-01-20 09:47:02 +01:00