Commit Graph

92 Commits (d024c5e698165c0641921a47be94fdb7e385e5af)

Author SHA1 Message Date
Aaron Bach c469358e5f
Fix bug with volumes in SimpliSafe set_system_properties service (#58721)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-29 22:17:15 -07:00
Paulus Schoutsen e1e864d2b6
Get the registry using the callback method (#58542) 2021-10-27 15:58:14 -07:00
Aaron Bach a813608185
Re-add support for realtime SimpliSafe websocket (#58061)
* Migrate SimpliSafe to new web-based authentication

* Ensure we're storing data correctly

* Re-add support for realtime websocket in SimpliSafe

* Updates

* Better lock state from websocket

* Unknown states

* Streamline

* Unnecessary assertion

* Remove conditions we can't reach

* Require multiple error states from REST API before reacting

* Only disconnect when needed

* Typing

* Code review
2021-10-25 16:45:13 -06:00
epenet a3d1159a13
Use DeviceInfo on components with via_device (R-X) (#58213)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-22 12:52:33 +02:00
Aaron Bach 2ff356393c
Clean up SimpliSafe entity inheritance structure (#58063)
* Migrate SimpliSafe to new web-based authentication

* Ensure we're storing data correctly

* Re-organize SimpliSafe device structure

* Constants

* More work

* Code review
2021-10-21 12:54:50 +02:00
Aaron Bach bf7c99c1f8
Migrate SimpliSafe to new web-based authentication (#57212) 2021-10-19 10:09:48 -10:00
Aaron Bach fe3b5e8804
Use current config entry standards for SimpliSafe (#57141)
* Use current config entry standards for SimpliSafe

* Include tests
2021-10-08 14:22:29 -05:00
Marc Mueller d51487f82a
Import Callable from collections.abc (3) (#56777) 2021-09-29 16:19:06 +02:00
Aaron Bach 1cd575df53
Cast SimpliSafe version number as a string in device info (#54356) 2021-08-09 23:50:39 +02:00
Aaron Bach f92ba75791
Enforce strict typing for SimpliSafe (#53417) 2021-07-27 22:11:54 +02:00
Marc Mueller f6b162bc39
Add pylint CodeStyle extension (#53147) 2021-07-19 06:57:06 -07:00
Aaron Bach a8ea214f2e
Bump simplisafe-python to 11.0.2 (#53121)
* Bump simplisafe-python to 11.0.2

* Fix CI
2021-07-18 17:12:05 -04:00
Aaron Bach 40ad25df4c
Fresh attempt at SimpliSafe auto-relogin (#52567)
* Fresh attempt at SimpliSafe auto-relogin

* Fix tests
2021-07-06 18:21:25 +02:00
Aaron Bach 64e63dedf6
Revert "Force SimpliSafe to reauthenticate with a password (#51528)" (#52484)
This reverts commit 549f779b06.
2021-07-05 11:38:31 +02:00
Aaron Bach 413c3afa12
Remove redundant property definitions in SimpliSafe (#52458)
* Remove redundant property definitions in SimpliSafe

* Remove useless init
2021-07-03 11:16:55 -05:00
Aaron Bach 513bcbc02b
Replace custom listener with helper in SimpliSafe (#52457) 2021-07-03 11:01:41 -05:00
Aaron Bach 549f779b06
Force SimpliSafe to reauthenticate with a password (#51528) 2021-06-18 16:11:35 -06:00
Aaron Bach d4601e00fd
Remove simplisafe websocket (#50213) 2021-05-07 15:41:37 +02:00
Aaron Bach fec02c88af
Allow SimpliSafe startup to retry on failure (#50211)
* Allow SimpliSafe startup to retry on failure

* Update __init__.py

* Black

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-06 20:03:35 -06:00
Aaron Bach 73714eba4b
Remove no-longer-functioning SimpliSafe websocket support (#49876)
* Remove no-longer-functioning SimpliSafe websocket support

* Linting
2021-04-29 19:02:45 -06:00
J. Nick Koston 87420627a8
Reduce config entry setup/unload boilerplate Q-S (#49778) 2021-04-27 22:10:04 +02:00
J. Nick Koston 3fa8ffa731
Enable mccabe complexity checks in flake8 (#49616)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
Paulus Schoutsen a90d3a051f
prefer total_seconds over seconds (#49505) 2021-04-20 17:41:36 -07:00
J. Nick Koston 4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
Erik Montnemery 14ff6d4d1f
Update integrations p-s to override extra_state_attributes() (#47759) 2021-03-11 21:23:20 +01:00
Quentame 198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Aaron Bach 14c2053841
Bump simplisafe-python to 9.6.4 (#45716)
* Bump simplisafe-python to 9.6.4

* Fix imports
2021-01-29 13:30:21 -07:00
Paulus Schoutsen 594e905742
Remove invalidation_version from deprecated (#44156)
* Remove invalidation_version from deprecated. We don't follow up and just hurts releases

* Revert change to ZHA
2020-12-12 22:24:16 +01:00
Aaron Bach ad7f1446be
Streamline SimpliSafe errors (#43117) 2020-11-13 09:38:58 +01:00
Aaron Bach 956e3b4451
Fix missing/incorrect SimpliSafe entities (#42846)
* Entity types

* Don't overdo it

* Fix missing/incorrect SimpliSafe entities
2020-11-04 18:59:54 -07:00
Aaron Bach 5b754c29e0
Fix missing sensor exceptions in SimpliSafe (#42845)
* Fix missing sensor exceptions in SimpliSafe

* Entity types

* Don't overdo it
2020-11-04 12:34:14 -07:00
Aaron Bach b0a6ac7e91
Properly unload listener for SimpliSafe config entry updates (#42579) 2020-11-04 12:28:43 -07:00
Niccolo Zapponi 93841e3e0c
Fix bug for SimpliSafe 2 systems repeatedly saying "your settings have been synchronised" (#42197)
* Fix bug for SimpliSafe 2 systems

* Improved loop and logging for SimpliSafe 2
2020-10-22 10:01:10 -06:00
Aaron Bach 8bcfe4c859
Remove coordinator success from SimpliSafe availability calculation (#42180) 2020-10-21 23:35:20 +02:00
Aaron Bach 8b6336a91a
Move SimpliSafe REST API to DataUpdateCoordinator (#41919)
* Mirgrate SimpliSafe REST API to DataUpdateCoordinator

* Docstring

* More work

* Good to go

* Linting

* Restore previous initial event check

* Linting

* Comment

* Simplify listener

* Code review

* Cleanup
2020-10-17 14:40:34 -05:00
Philip Allgaier dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
Aaron Bach bbef87d3f3
Clean up SimpliSafe device info and sensor creation (#41920)
* Clean up SimpliSafe device info and sensor creation

* Code review
2020-10-16 12:01:16 -05:00
Aaron Bach eff0c4a494
Properly unload SimpliSafe websocket listener (#41952) 2020-10-16 17:44:53 +02:00
Aaron Bach 76f88459dd
Fix incorrect SimpliSafe websocket disconnect listener (#41923) 2020-10-15 23:13:45 -05:00
Aaron Bach a0bb8ae5d9
Fix unhandled exception with SimpliSafe socket disconnection (#41917) 2020-10-15 17:00:57 -05:00
Aaron Bach 6114006b8b
Deprecate YAML config for SimpliSafe (0.119 removal) (#41896)
* Deprecate YAML config for SimpliSafe (0.119 removal)

* Remove import step from config flow
2020-10-15 14:28:09 -06:00
Aaron Bach 2079e41b7a
Properly disconnect from SimpliSafe websocket on HASS shutdown (#41894)
* Properly disconnect from SimpliSafe websocket on HASS shutdown

* Update homeassistant/components/simplisafe/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/simplisafe/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-10-15 13:05:00 -06:00
Aaron Bach db7c16162d
Remove duplicated options handling in SimpliSafe (#41806)
* Remove duplicated options handling in SimpliSafe

* Incorrect property name
2020-10-15 10:36:04 -06:00
Aaron Bach 690024b34a
Fix SimpliSafe re-auth flow (#41805)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-15 10:15:32 +02:00
Niccolo Zapponi 8a45bc2d13
Add support for SimpliSafe sensors (#41080)
* Add support for SimpliSafe sensors

* Turn sensor refresh rate to a configurable setting

* Set minimum to scan interval

* Removed dynamic sensor refresh rate

* Refactoring

* Refactoring

* Move battery entities to binary_sensor platform

* Bug fix

* Clean up

* Simplified device info override

* Ignore sensor cache
2020-10-12 11:31:55 -06:00
Ville Skyttä 1bf2c4d976
Upgrade pylint to 2.6.0 (#39363) 2020-08-29 07:59:24 +02: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
Aaron Bach 9e21fb6b52
Handle unhandled exceptions related to unavailable SimpliSafe features (#38812) 2020-08-12 15:21:17 -06:00
Aaron Bach a5b7a2c228
Fix SimpliSafe to work with new MFA (#38097)
* Fix SimpliSafe to work with new MFA

* Code review (part 1)

* Input needed from Martin

* Code review

* Code review

* Restore YAML

* Tests

* Code review

* Remove JSON patching in tests

* Add reauth test

* One more reauth test

* Don't abuse the word "conf"

* Update homeassistant/components/simplisafe/config_flow.py

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

* Test coverage

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-07-23 20:02:29 -06:00
Franck Nijhof 53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00