App #1: Doorbell notification

Hi @SupahNoob

HA should send me only one notification. Just imagine the case that I am on way to the door, I don’t want to receive multiple notifications if can reach the door in less than 30 seconds. So, those extra rings should be discarded.

Thanks for all your suggestions to improve the code :+1: . Maybe initializing self.last_ring with None indeed is more pythonic, but in this case, I think it’s more clear without an extra layer of IF conditions (at least for me).

Good idea :+1:

Thanks again for your time!
Humberto

1 Like