* 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>
* 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.
* Rename BinarySensorDevice to BinarySensorEntity
* Tweak
* Move deprecation warning to __new__, add test
* Move deprecation warning back to __init__
* Move deprecation warning to __init_subclass
* Add prettier (in pre-commit and CI)
* Make all file prettier
* Change order
* Add to Azure Pipelines
* Fix a YAML file prettier caught as invalid
* Remove flow mapping using curly braces from all YAML service files
* 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
* 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
* 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
* 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
* 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
* 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
* Add battery sensors for August devices
* Additional tests and cleanup in prep for config flow
and device registry
* pylint
* update name for new style guidelines - https://developers.home-assistant.io/docs/development_guidelines/#use-new-style-string-formatting
* Config Flow for august push
* Update homeassistant/components/august/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Address review items
* Update tests
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Deduplicate code in the august integration
* Add additional tests for august (more coming)
* Door state is now updated when a lock or unlock call returns
as the state is contained in the response which avoids
the confusing out of sync state
* revert
* document known issue with doorsense and lock getting out of sync (pre-existing)
* Address review comments
* Additional review comments
* Use f-strings in integrations starting with A
* Use f-strings in tests for integrations starting with A
* Fix pylint by renaming variable
* Fix nested for loop in f-string for aprs device_tracker
* Break long lines into multiple short lines
* Break long lines into multiple short lines v2
* Significantly reduce code in august integration
* Activity updates can now be processed by py-august
this allows us to eliminate the activity sync
code for the door sensors and locks
* Lock and door state can now be consumed from
the lock detail api which allows us to
remove the status call apis and reduce
the number of API calls to august
* Refactor the testing method for locks (part #1)
* Update homeassistant/components/august/binary_sensor.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Switch to asynctest instead of unittest for mock.patch
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Audit state handling of august bridges and sensors
This addresses issue #29980
* Prevent setting up august locks that do not have a bridge as they will never work
* Prevent locks showing available when their bridge is offline
* Prevent door sensors from showing available when their bridge is offline
* Prevent creating door sensors for locks that do not have them
* Prevent doorbells showing unavailable when they are in standby mode
* Set SCAN_INTERVAL for binary_sensors to 5 seconds as
data comes in from the activity endpoint more frequently
* Update homeassistant/components/august/__init__.py
raise if the detail is missing when checking doorsense
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Handle another place where the lock detail could not exist
* Address review comments
* Handle lock detail update failing and add test
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Refresh the august access token
when needed.
Currently august will stop working when the token
expires about every six month.
This resolves issue #23788
* Make refresh_access_token_if_needed private since we do not want additional callers
* Add init
As polling for lock status is every 15 minutes,
we read lock and unlock events from the activity log.
An upstream update of py-august was needed to
expose the door open and close events.
Door open and close events are now seen within
a few seconds instead of delayed 15+ minutes.
* Significantly reduce the number of API calls that the august integration
makes.
The poll interval for the lock status API is now 15 minutes
instead of every 10 seconds because we can use the activity
API to see changes in lock state. The interval for the
activity API is 10 seconds which allows for the same
frequency of state monitoring without all the additional API calls.
With four locks, this change results in an ~80% reduction in the number
of API calls.
The result of the lock and unlock APIs now update the lock state instead
of waiting for the next poll. This change also has the added benefit of
making the UI appear far more responsive.
* Convert to using UTC times
* working unique ids for august
* cleanup blank lines
* cleanup blank lines
* cleanup blank lines
* rebase
* get the oneline back in
* blank line stuff
* whitespace cleanup
* Blank Line .
* blank line again
The available state for the August Doorbell is currently set based on the state of the binary ding sensor. This means that if there is no door bell rings in a while on startup the doorbell is shown as Unavailable (#20421) . This ties the availability of the doorbell to the actual online state thats in the device information retrieved from august so that even if there has not been a doorbell ring activity on a while the device shows as online when it is.