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
..
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-17 08:38:03 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 14:44:11 +02:00
2018-10-01 14:44:11 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-15 13:21:21 -06:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-16 10:06:00 +02:00
2018-10-08 10:20:18 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-14 17:13:25 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00