core/homeassistant/components/lock
ehendrix23 f504e5ef61 Add doorsense sensor for August 3rd Gen Smart Lock Pro (#17299)
* Add doorsense sensor for August 3rd Gen Smart Lock Pro

Add a binary sensor to August for the August 3rd Gen Smart Lock Pro doorsense sensor.

This is a re-do from PR 17116 https://github.com/home-assistant/home-assistant/pull/17116 that I closed due to rebase issue on my end.

* Changed to use snjoetw provided code

Going through the py-august I found that snjoetw had provided updated versions for the august component (august.py and binary_sensor/august.py) to include DoorSense sensor.
Changed what I did to to what snjoetw provided instead as he split it into 2 classes; much cleaner I think.

I modified his coding with:
   Fixes that were done to the August component and not part of the coding snjoetw provided.
   Added the debug logging improvement I had done in the code.

Note, fix I committed earlier for lock atribute (lock/august.py) is thus still the same.

* Reverted change from add_device to add_entities

Missed an item when merging snjoetw's code with current. Fixed.

* Updated call from add_devices to add_entities as well

Updated the call from add_devices to add_entities.

* Fixed permissions on files

Fixed permissions on components/august.py and binary_snesor/august.py

* Changed if/else to if/continue

Changed logic so that if the door sensor state is unknown during initalization the debug log is written and then continue the loop instead of using if/else logic.

* Added available property for Door Sensor

Added the available property for the Door Sensor and setting it to False if a status unknown is received.

* Updated setting self._available

Changed line for setting self._available to what Martin provided. Much  more efficient to read. :-)
2018-10-19 09:37:02 +02:00
..
__init__.py Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
abode.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
august.py Add doorsense sensor for August 3rd Gen Smart Lock Pro (#17299) 2018-10-19 09:37:02 +02:00
bmw_connected_drive.py Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
demo.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
homematic.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
isy994.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
kiwi.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
lockitron.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
mqtt.py Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
nello.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
nuki.py Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
services.yaml Update services.yaml files (#10229) 2017-10-30 21:39:12 +01:00
sesame.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
template.py Add context to scripts run by template entities (#17329) 2018-10-15 11:38:49 +02:00
tesla.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
vera.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
verisure.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
volvooncall.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
wink.py Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
xiaomi_aqara.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
zwave.py Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00