Commit Graph

65 Commits (4bca9596ee5d0e5af7a4faa1d896fe7e88ecc849)

Author SHA1 Message Date
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
Aaron Bach b876f7f11a
Bump simplisafe-python to 9.2.0 (#34750) 2020-04-27 10:41:33 -06:00
Aaron Bach 3ce89409d2
Add service to clear SimpliSafe notifications (#34481) 2020-04-23 10:53:06 -06:00
Aaron Bach 828f368323
Handle flaky SimpliSafe notification registration (#34475) 2020-04-23 10:52:11 -06:00
Aaron Bach 675525f47c
Ensure existing SimpliSafe notifications trigger event on HASS startup (#34232)
* Ensure existing SimpliSafe notifications trigger event on HASS startup

* Don't redefine a standing function each loop iteration

* Wait until HASS state is "running"

* Linting

* Linting

* Code review

* Code review

* Simplify

* Code review

* Cleanup
2020-04-19 19:41:16 -06:00
Aaron Bach 6ca2c4da3a
Properly demarcate websocket and REST API callbacks in SimpliS… (#33706)
* Properly demarcate websocket and REST API callbacks in SimpliSafe

* Docstring

* Method names

* Cleanup

* Remove spurious logging

* Remove redundant method

* Fix comment

* Code review
2020-04-06 14:17:45 -07:00
Franck Nijhof 7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
Aaron Bach a3e2504470
Add cleanup to SimpliSafe (#32889) 2020-03-17 07:02:30 -04:00
Aaron Bach 4f0997f6e9
Add options flow for SimpliSafe (#32631)
* Fix bug where SimpliSafe ignored code from UI

* Fix tests

* Add options flow

* Fix tests

* Code review

* Code review

* Code review
2020-03-12 22:00:00 -07:00
Aaron Bach df04fe3258
Bump simplisafe-python to 9.0.0 (#32215) 2020-02-26 18:52:07 -08:00
Aaron Bach e435f6eb67
Fix error where SimpliSafe websocket would disconnect and not reconnect (#32199)
* Fix error where SimpliSafe websocket would disconnect and not reconnect

* Await
2020-02-26 12:19:14 +01:00
Aaron Bach b5c1afcb84
Make SimpliSafe entities unavailable when wifi is lost (#32154)
* Make SimpliSafe entities unavailable when wifi is lost

* Remove online status from REST API

* Comments

* Mispelling
2020-02-25 20:03:41 -07:00
Aaron Bach 7c2765fbff
Remove unused SimpliSafe config flow function (#32166)
* Remove unused SimpliSafe config flow function

* Code review comments from other PR

* Linting
2020-02-24 22:02:20 -07:00
Aaron Bach 6e6625e1ab
Remove no-longer-needed SimpliSafe websocket watchdog (#32129)
* Fix SimpliSafe reconnection issue upon websocket error

* Rename listener cancelation properties

* Remove watchdog
2020-02-23 20:47:19 -07:00
Aaron Bach 30efef3085
Add support for SimpliSafe system notifications (#31936)
* Add support for SimpliSafe system notifications

* Actually process notifications

* Code review comments
2020-02-18 11:49:36 -07:00
Aaron Bach 74f0262e82
Bump simplisafe-python to 8.1.1 (#31915) 2020-02-17 13:16:24 -07:00
Aaron Bach d6f0c26e7f
Fire HASS events on SimpliSafe events (#31811)
* Fire HASS events on SimpliSafe events

* Bump simplisafe-ptyhon to 7.3.0

* Update reqirements

* Updates

* Revert "Updates"

This reverts commit 5581889417.

* Restrict which events get fired

* Code review comments
2020-02-14 11:24:35 -07:00
Aaron Bach f091e0412f
Add support for real-time data from SimpliSafe (#31424)
* Add support for real-time data from SimpliSafe

* Updated requirements

* Linting

* Ensure dispatcher topic contains the domain

* Don't bother with a partial

* Websovket dataclass and other code review

* Ensure initial_event_to_use works with error

* Don't inline methods

* Don't abuse loop variable

* Simplify initial event retrieval

* Add connection lost and restored events

* Revert "Add connection lost and restored events"

This reverts commit e7ffe05938.

* Make _on_disconnect a static method

* Code review comments

* Allow entities to opt out of REST and/or websocket API updates

* Revert "Allow entities to opt out of REST and/or websocket API updates"

This reverts commit 1989f2e00e.

* Code review comments

* Fix issues with events not triggering correct entities

* Bug fixes
2020-02-13 11:30:38 -08:00
Aaron Bach 2610415501
Streamline SimpliSafe data and token management (#31324)
* Streamline SimpliSafe API usage

* Streamline SimpliSafe data and token management

* Correctly define self.systems

* Inline update method
2020-02-02 17:16:09 -07:00
Aaron Bach f95a072877
Constrain SimpliSafe's check for emergency token usage (#31214) 2020-01-27 10:50:16 -07:00
Aaron Bach cf165cc35f
Make SimpliSafe integration more resilient to SimpliSafe cloud issues (#31116)
* Make SimpliSafe integration more resilient to SimpliSafe cloud issues

* Clear emergency refresh token

* Stop listening when appropriate

* Cleanup

* Saving refresh token should happen after all updates

* Code review
2020-01-24 21:19:40 -07:00
Aaron Bach 847196dbe8
Remove option to configure SimpliSafe scan interval (#30909)
* Enforce minimum scan interval for SimpliSafe

* Remove scan interval all together

* Fix tests
2020-01-17 13:43:41 -07:00
Aaron Bach b585feb109
Consolidate SimpliSafe property services (#30567)
* Consolidate SimpliSafe property services

* Code review comments

* Code review comments

* Ensure all services are admin services

* Code review comments
2020-01-12 21:32:08 -07:00
springstan 5dbfa16e04 Move imports to top for simplisafe (#29262) 2019-11-30 17:16:05 -07:00
Aaron Bach 2cdd8ad15e
Add new properties and services for V3 SimpliSafe systems (#28997)
* Add new properties and services for V3 SimpliSafe systems

* Small semantic change

* Updated docstrings

* Semantics

* Streamlined adding V3 properties

* Re-add attribute

* Bump to 5.3.5

* Owner comments

* Correct coroutine name
2019-11-26 11:44:40 -07:00
Aaron Bach 8789da36be Add support for SimpliSafe locks (#28672)
* Start

* Lock init

* More stubbing

* Final pieces for PR

* Fixed incorrect property access

* Updaed .coveragerc

* Ensure we can handle unknown states

* Account for lock's offline property

* Account for device online

* Unload components concurrently

* Handle unknown states more gracefully
2019-11-13 20:48:08 +01:00
Aaron Bach 179a2eb187 Create base entity for SimpliSafe 2019-11-09 23:41:02 +01:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00