Commit Graph

40 Commits (d5116810d4bd8ae2209f84c34c30af8117ed10bf)

Author SHA1 Message Date
Ville Skyttä 470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
Erik Montnemery 4d32e1ed01
Minor improvements of MQTT typing (#52578)
* Minor improvements of MQTT typing

* Tweak
2021-07-06 14:38:48 +02:00
J. Nick Koston 51be2f860a
Reduce boilerplate to setup config entry platforms A-C (#49681)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-26 07:46:55 -10:00
Robert Svensson 12a9695798
Use config_entry.on_unload rather than local listener implementation in Axis (#49495) 2021-04-20 08:53:05 -10:00
J. Nick Koston 4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
Robert Svensson 31ae121645
Add fixtures for Axis rtsp client and adapt tests to use them (#47901)
* Add a fixture for rtsp client and adapt tests to use it

* Better fixtures for RTSP events and signals
2021-04-09 10:56:53 +02:00
Robert Svensson a61d93adc2
Increase time out for http requests done in Axis integration (#48610) 2021-04-01 16:22:36 -07:00
J. Nick Koston c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Robert Svensson 03fb73c0ae
Option to select what video source Axis camera should use (#45268)
* Fully working proposal of config option to select what video source camera entity should use

* Bump dependency to v43
Reflect dependency changes in how image sources is now a dict

* Fix bdracos comment
2021-01-23 00:15:58 +01:00
Robert Svensson b601e7e497
Introduce reauthentication flow to Axis integration (#45307) 2021-01-21 12:56:04 +01:00
Robert Svensson d80ef6c5fb
Create shortcuts for config entry parameters in Axis device (#45233) 2021-01-16 19:54:48 +01:00
Robert Svensson 598a0d19b1
Normalise unique ID in Axis integration (#45203)
* Move adding unique id to config entry from setup_entry to migrate_entry

* Normalise unique ID

* MQTT subscribe should still use the serial number in the way the device itself expects
2021-01-16 01:01:14 +01:00
Robert Svensson 6325bc8bfe
Follow Axis library changes and improve tests (#44126) 2021-01-13 14:03:54 +01:00
Robert Svensson f0e11f713e
Make sure to clean up httpx session on failed connection to Axis device (#42428) 2020-10-26 22:12:21 +01:00
Robert Svensson 1303d20064
Adapt Axis integration to async HTTPx calls (#42095) 2020-10-20 09:31:04 +02:00
Robert Svensson 028689d6bd
Remove update on add signalling in Axis integration (#41956)
Minor clean up of the integration
2020-10-16 11:54:48 -05:00
Ville Skyttä b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Robert Svensson 78af0a4705
Make Axis non-privileged users work again (#36731) 2020-06-13 12:35:52 +02:00
Robert Svensson 99318b7b11
Remove Axis option to enable/disable camera (#36420) 2020-06-04 14:25:50 +02:00
Robert Svensson cf6043fc2d
Support Axis stream profile and configuring it through options flow (#36322)
* Support stream profile and configuring it through options flow

* Options flow test

* Allow configuration of not using a stream profile

* Shorten default stream profile string
2020-06-01 18:45:38 +02:00
Robert Svensson 01d9366299
Improve Axis integration (#36205)
* Improve configuration

* Read new properties for basic device information
Improve tests by mocking less improving stability of tests

* Clean up in device tests

* Support new port management api

* Improve initializing data

* Bump dependency to v28
2020-05-31 20:00:15 +02:00
Robert Svensson 376e0e0e93
Add Axis MQTT support (#36015)
* Working PoC

* Store

* Handle subscribing to MQTT and stopping stream when first telegram arrives

* Improve naming

* Now with test

* Better strings

* Fix Martins comments

* Improve mock device patching

* Bump dependency to v27
Add MQTT as after dependency
2020-05-25 23:13:34 +02:00
Robert Svensson 714047f789
Axis - Streamline setup and teardown of integration (#35675)
* Streamline setup and teardown of integration

* Dont remove integration twice
2020-05-15 23:56:09 +02:00
Robert Svensson e6c58c9795
Axis - Code improvements (#35592)
* Adapt library improvements
Clean up integration and tests and make them more like latest changes in UniFi integration

* Bump dependency to v26
2020-05-14 10:49:27 +02:00
Robert Svensson 56657fa859
Axis - config flow use new helper functions (#31286)
* Make use of new config flow helpers
Simplify Axis entry config to work with config flow helpers

* Keep old device data for rollback purposes
2020-01-30 22:20:30 +01:00
Robert Svensson 63347ebeb5
Make Axis integration use config entry unique id (#30461)
* Make Axis integration use config entry unique id
2020-01-04 08:58:18 +01:00
Bas Nijholt b0d0060643 sort imports according to PEP8 for axis (#29621) 2019-12-08 15:44:03 +01:00
bouni 4cded9782d moved imports to top level (#27498) 2019-10-12 12:50:30 -07:00
Franck Nijhof ad51615718 Use literal string interpolation in integrations A (f-strings) (#26377)
* Use literal string interpolation in integrations A (f-strings)

* Black
2019-09-03 09:11:36 -05:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Robert Svensson eb912be47a
Axis IO-port support (#23312)
Support digital inputs and supervised inputs, digital outputs and relays
2019-05-20 07:45:31 +02:00
Robert Svensson 0b7e62f737
Axis change how new event is signalled (#23152) 2019-04-17 15:21:42 +02:00
Robert Svensson a45df7aac9
Axis - improved internal parameter handling (#23122)
Will result in faster startup per entry due to less network data
2019-04-16 10:46:29 +02:00
Robert Svensson 60c787c2e6 Axis component support unloading entries (#22692)
* Add support for unloading entries

* Improve config entry tests

* Improve coverage for device

* Remove callback when relevant
2019-04-15 15:06:45 -07:00
Robert Svensson ec171b9928 Axis - start stream when system is ready (#23119)
* Make sure that event stream doesn't start until event listeners are ready

* Change order
2019-04-15 09:20:01 -07:00
Robert Svensson 8a0b210f87 Axis discovery updates host address (#22632)
* Discovery can update host on existing entries

* Add support in device to update host on entry update

* Fix tests and listener

* Fix hound comment

* Fix failing tests from cleanup
2019-04-02 11:13:11 -07:00
Robert Svensson 5f6037d563
Axis component reflect device availability (#22401) 2019-03-29 15:20:12 +01:00
Robert Svensson 8f3434c2ab Fix events so they work with multiple devices (#22477) 2019-03-27 19:54:27 -07:00
Robert Svensson 52437f6246 Axis devices support device registry (#22367)
* Add support for device registry

* Fix test
2019-03-27 18:25:01 +01:00
Robert Svensson 6988fe783c
Axis config flow (#18543)
* Initial draft

* Add tests for init
Fix hound comments

* Add tests for device
Change parameter handling to make device easier to test

* Remove superfluous functionality per Martins request

* Fix hound comments

* Embedded platforms

* Fix device import

* Config flow retry

* Options default values will be set automatically to options in config entry before component can be used

* Clean up init
Add populate options
Fix small issues in config flow
Add tests covering init

* Improve device tests

* Add config flow tests

* Fix hound comments

* Rebase miss

* Initial tests for binary sensors

* Clean up
More binary sensor tests

* Hound comments

* Add camera tests

* Fix initial state of sensors

* Bump dependency to v17

* Fix pylint and flake8

* Fix comments
2019-03-24 16:16:50 +01:00