Provide user consumable errors when lock operations fail (#31864)

* Provide user consumable errors when lock operations fail

This resolves issue #26672

* include from in raise

* pylint

* Cleanup of mocking.
This commit is contained in:
J. Nick Koston 2020-02-17 12:30:14 -06:00 committed by GitHub
parent 18dfb02355
commit 00ac7a7d70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 194 additions and 93 deletions

View file

@ -56,7 +56,7 @@ async def _async_activity_time_based_state(data, doorbell, activity_types):
return None
# Sensor types: Name, device_class, async_state_provider
# sensor_type: [name, device_class, async_state_provider]
SENSOR_TYPES_DOOR = {"door_open": ["Open", "door", _async_retrieve_door_state]}
SENSOR_TYPES_DOORBELL = {