Commit Graph

58 Commits

Author SHA1 Message Date
Franck Nijhof
af2feb3d40 Update pyupgrade to v2.37.1 (#74989) 2022-07-11 16:54:01 +02:00
J. Nick Koston
06ebc1fa14 Add support for async_remove_config_entry_device to august (#72627) 2022-06-10 09:53:42 +02:00
epenet
053c4428a9 Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
J. Nick Koston
65c670c2c7 Add diagnostics to august (#68157) 2022-03-15 19:05:56 +01:00
J. Nick Koston
a6742eff34 Add button to wake august locks from deep sleep (#66343) 2022-02-11 17:13:35 -06:00
J. Nick Koston
8c9bd6e790 Increase august timeout and make failure to sync at startup non-fatal (#65281) 2022-01-30 20:50:49 -08:00
J. Nick Koston
06fd75be7e Ensure august status is current when integration loads (#64027) 2022-01-13 18:26:47 +01:00
J. Nick Koston
b5bb692fe4 Fix august locks failing to lock/unlock (#63652) 2022-01-09 21:27:27 -08:00
J. Nick Koston
03477e0ae6 Split august motion and image capture binary sensors (#62154) 2021-12-18 22:25:30 -08:00
Paulus Schoutsen
31153ac155 Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Ville Skyttä
a598d9f353 Use HTTPStatus instead of HTTP_ consts and magic values in components/a* (#57988) 2021-10-22 14:21:34 +02:00
Paulus Schoutsen
a4d9019ffc Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Erik Montnemery
d5b6dc4f26 Use hass_client_no_auth test fixture in integrations a-g (#55581) 2021-09-02 14:49:20 +02:00
J. Nick Koston
c18b626d67 Fix flakey august pubnub test (#53474) 2021-07-25 21:14:38 -07:00
J. Nick Koston
bfe3ef0980 Update august to support locking, unlocking, jammed (#52814) 2021-07-20 21:48:15 -07:00
Ville Skyttä
19d25cd901 Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
J. Nick Koston
855559004b Drop unneeded async_setup from august (#49675) 2021-04-25 23:13:54 +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
J. Nick Koston
e2837f08e8 Small cleanups for august (#49493) 2021-04-25 11:32:34 +02:00
Ville Skyttä
153d6e891e Use config_entries.SOURCE_* constants (#49631) 2021-04-25 11:27:40 +02:00
J. Nick Koston
4cd7f9bd8b Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
J. Nick Koston
a2c4b438ea Convert august to be push instead of poll (#47544) 2021-03-21 22:35:12 -07:00
J. Nick Koston
f605a3c149 Remove YAML support from August (#47615) 2021-03-16 13:22:07 -10:00
Erik Montnemery
78b21b1ad1 Update tests a-b to use async_get() instead of async_get_registry() (#47651) 2021-03-09 14:24:34 +01:00
Ville Skyttä
2fb3be50ab Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None

* Remove unnecessary async_get_device connections arg usages

Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
J. Nick Koston
94825b3e15 Do not restore unavailable state for august locks (#44722) 2021-01-01 12:44:53 +01:00
Paulus Schoutsen
1c36bf5e19 Fix block till done in create entry config flow tests (#42290) 2020-10-24 16:20:56 +02:00
Ville Skyttä
5e90a4d000 Use more state attribute name constants (#40428) 2020-09-21 23:03:39 +02:00
J. Nick Koston
5ea04d64f6 Prompt to reauth when the august password is changed or token expires (#40103)
* Prompt to reauth when the august password is changed or token expires

* augment missing config flow coverage

* augment test coverage

* Adjust test

* Update homeassistant/components/august/__init__.py

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

* block until patch complete

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-16 17:35:01 +02:00
springstan
d2b1918e9c Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Franck Nijhof
1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick Koston
bf72e3c965 Update august manufacturer name (#37867)
* Update august manufacturer name

This allows homekit to link the accessories to the august app

* yeah.. update the test
2020-07-14 18:03:24 -10:00
Paulus Schoutsen
2af984917e Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
J. Nick Koston
963236916c Fix another race in august tests (#35054) 2020-05-01 21:01:15 -07:00
J. Nick Koston
af62660b14 Attempt to fix flapping august lock test (#34998) 2020-04-30 22:35:23 -07:00
Paulus Schoutsen
ec47216388 Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
J. Nick Koston
592f316b3f Fix race condition in august test under py38 (#34775) 2020-04-28 23:22:33 -05:00
springstan
9f713dac7f Use UNIT_PERCENTAGE constant (#34054) 2020-04-11 22:53:48 +02:00
J. Nick Koston
7dd42bc32d Separate august keypads into their own device (#33665)
The keypad has its own unique id so its better
represented as its own device.  This fixes
showing the keypad battery state for the lock
in the UI.
2020-04-08 12:57:27 -07:00
springstan
eae21be5b9 Improve string formatting v6 (#33698) 2020-04-07 23:14:28 +02:00
J. Nick Koston
048f9e7daa Throw ConfigEntryNotReady when august servers are offline or u… (#32635)
* Throw ConfigEntryNotReady when august servers are offline

* august has tests now and its nearing 100%

* Adjust per review

* define in init
2020-03-10 17:10:00 -07:00
J. Nick Koston
ae147fd9c7 Lock operation sensors for August (#32593)
* adkj

* reduce

* Convert august to async

Async io was added to py-august 0.24

* Fix lint

* Lock operation sensors for august

* Tracking lock operation method allows user presence detection at the lock

* revert lock changes

* fix activity count merge conflict reversion

* Fix revert that come back with the conflict
2020-03-10 17:09:49 -07:00
J. Nick Koston
3318e65948 Convert august to async (#32586)
* Convert august to async

Async io was added to py-august 0.24

* Fix lint
2020-03-09 13:54:05 -07:00
J. Nick Koston
7ca4665711 Move keypad battery implementation details into py-august (#32349)
* Move keypad battery implementation details into py-august

* Upgrade to py-august 0.22.0 which also adds gen2 doorbell battery data

* remove cruft from previous refactor
2020-03-01 23:22:28 -08:00
J. Nick Koston
be14b94705 Restore august lock changed_by state on restart (#32340)
* Various code review items from previous PRs

* Add a test for fetching the doorbell camera image

* Switch to using UNIT_PERCENTAGE for battery charge unit

* Add tests for changed_by
2020-02-29 12:12:50 +01:00
J. Nick Koston
223c01d842 Coordinate all august detail and activity updates (#32249)
* Removing polling from august

* Now using subscribers to the detail and activity

* Fix hash to list keys

* continue to the next house if one fails

* Add async_signal_device_id_update

* Fix double initial update

* Handle self.hass not being available until after async_added_to_hass

* Remove not needed await

* Fix regression with device name
2020-02-27 19:44:22 -08:00
J. Nick Koston
4c5e364d90 Centralize august activity updates (#32197)
* Reduce August doorbell detail updates

* Doorbell images now get updates from the activity feed

* Tests for activity updates

* py-august now provides bridge_is_online for available state

* py-august now provides is_standby for available state

* py-august now provides get_doorbell_image (eliminate requests)

* remove debug

* black after merge conflict

* Centralize august activity updates

* Updates appear significantly more responsive

* Should address the community complaints about "lag"

* Reduce detail updates (device end points) to one hour interval

* Signal entities to update via dispatcher when new activity arrives

* Resolves out of sync state (skipped test is now unskipped)

* pylint

* fix merge conflict

* review comments

* Remove stray

* Address review items that can be done without refactor
2020-02-26 18:48:44 -08:00
J. Nick Koston
638a3025df Reduce August doorbell detail updates (#32193)
* Reduce August doorbell detail updates

* Doorbell images now get updates from the activity feed

* Tests for activity updates

* py-august now provides bridge_is_online for available state

* py-august now provides is_standby for available state

* py-august now provides get_doorbell_image (eliminate requests)

* remove debug

* black after merge conflict
2020-02-26 08:43:41 +01:00
J. Nick Koston
4c33a9d732 Add model to august device_info (#32187)
* Add model to august device_info

* Address review comments from PR#32125

* Fix test name
2020-02-25 18:34:31 -08:00