Files
home-assistant-core/homeassistant/components
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-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-17 14:12:41 +02:00
2018-10-10 14:25:21 +02:00
2018-10-17 23:09:05 +02:00
2018-10-08 16:35:38 +02:00
2018-10-03 23:12:21 +02:00
2018-10-17 14:12:41 +02:00
2018-10-08 20:50:24 +02:00
2018-10-18 13:52:38 +02:00
2018-10-14 17:11:39 +02:00
2018-10-11 10:55:38 +02:00
2018-10-10 14:25:21 +02:00
2018-10-01 16:09:31 +02:00
2018-10-07 23:26:46 +02:00
2018-10-17 14:12:41 +02:00
2018-10-01 08:52:42 +02:00
2018-10-12 14:58:09 +02:00
2018-10-17 14:12:41 +02:00
2018-10-19 09:17:19 +02:00
2018-10-17 14:12:41 +02:00
2018-10-02 11:03:09 +02:00
2018-10-02 14:33:47 +02:00
2018-10-17 14:12:41 +02:00
2018-09-11 11:21:48 +02:00
2018-10-17 14:12:41 +02:00
2018-10-17 14:12:41 +02:00
2018-10-10 14:25:21 +02:00
2018-10-01 08:52:42 +02:00
2018-09-26 18:02:05 +02:00
2018-10-17 14:12:41 +02:00
2018-10-17 14:12:41 +02:00
2018-10-17 23:09:05 +02:00
2018-10-13 00:33:13 +02:00
2018-10-15 11:43:27 +02:00
2018-10-15 11:48:36 +02:00
2018-10-17 14:12:41 +02:00
2018-10-17 14:12:41 +02:00
2018-10-09 16:54:38 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-02 11:03:09 +02:00
2018-10-02 07:32:03 +02:00
2018-07-20 11:45:20 +03:00
2018-10-17 23:09:05 +02:00
2018-07-18 11:54:27 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-07-10 13:19:32 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
…
…
2018-07-20 11:45:20 +03:00
2018-09-16 01:17:47 +02:00
2018-07-23 14:05:38 +02:00
2018-10-03 06:28:08 +02:00
2018-08-13 10:39:48 -07:00
2018-10-02 10:23:37 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-14 23:51:15 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
…
2018-10-01 08:52:42 +02:00
2018-10-01 08:59:45 +02:00
2018-10-01 08:59:45 +02:00
2018-10-01 08:59:45 +02:00
2018-08-23 22:56:18 +02:00
2018-10-01 08:52:42 +02:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
…
2018-10-15 12:16:40 +02:00
2018-07-20 11:45:20 +03:00
…
2018-10-02 10:23:37 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-08-16 14:21:49 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-10-17 23:09:05 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-09-23 09:41:45 +02:00
2018-10-01 08:52:42 +02:00
…
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
…
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-09-27 23:13:11 +02:00
2018-08-14 12:29:55 +02:00
2018-10-01 08:52:42 +02:00
2018-09-18 14:59:39 +02:00
2018-10-02 11:03:09 +02:00
2018-07-20 11:45:20 +03:00
2018-10-08 10:20:18 +02:00
2018-07-29 19:49:36 +02:00
2018-08-21 15:49:58 +02:00
…
2018-10-01 08:52:42 +02:00
…
2018-08-27 21:56:28 +02:00
2018-10-01 08:52:42 +02:00
…
2018-10-01 08:52:42 +02:00
2018-07-18 11:54:27 +02:00
2018-07-20 11:45:20 +03:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-07-23 14:05:38 +02:00
2018-10-07 12:33:16 +02:00
2018-07-23 10:16:05 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
…
2018-10-01 08:52:42 +02:00