I have updated the original question to example thread:
Essentially you need wireless switch (Xiaomi Mijia Smart Switch) which is based on zigbee. Plus any supported device which support audio playback for notification.
I have included a example automation for both Zigbee2Mqtt and also if you have local lan access to your xiaomi gateway. I have found using Zigbee2Mqtt was much more reliable than using xiaomi gateway v2 in my use case. Currently my gateway is only used as hallway light and doorbell.
Essentially I have automation for day time which will send audible doorbell and also notification to my phone using signal, you can use your notification of choice. While other is essentially just condition time is inverse with only notification.
For some reason, my configuration is not working. When i reload the automation it seem to give me this error about the trigger (mapping value not allowed) and if i reboot hassio it won’t sucessful reboot up again. I have go back and clear the automation config.
Invalid config for [automation]: [automation] is an invalid option for [automation]. Check: automation->automation. (See /config/configuration.yaml, line 181). Please check the docs at https://home-assistant.io/components/automation/
Do you know why this is clausing it? I mean here is my groups configuration
Hello everyone ! Maybe somebody will be able to help me on that.
I try to make a Xiaomi Wireless Swich Doorbell as well and this automation work perfectly, but i want add some specification.
I would like to add a time condition and also add notification via html 5 android (notification already work).
I explain more, when my little daughter may sleep (common sleep time for her and night), i only want notification, if someone push the doorbell between hour that i now she will not sleep, i would like to ring and notification !
Automations a try so far :
- alias: DoorBell_notification_ringtone
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d00016c1301
click_type: single
condition:
condition: and
conditions:
- condition: time
after: '09:00:00'
before: '13:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
- condition: time
after: '16:00:00'
before: '19:30:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: notify.html5_notify
data:
message: "Il y a quelqu'un qui sonne !"
title: "Sonnette 3.0"
- service: xiaomi_aqara.play_ringtone
data:
gw_mac: !secret xiaomi_mac
ringtone_id: '10'
ringtone_vol: '60'
- alias: DoorBell2_notification_only
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d00016c1301
click_type: single
condition:
condition: and
conditions:
- condition: time
before: '09:00:00'
after: '13:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
- condition: time
before: '16:00:00'
after: '19:30:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: notify.html5_notify
data:
message: "Il y a quelqu'un qui sonne !"
title: "Sonnette 3.0"
The problem is, it’s still ring after 19:30 . And maybe there is way to do it in only 1 automation and not 2 ?
Xiaomi DoorBell wifi version is coming to me from gearbest store. Meanwhile quick question - I have gateway ver 3 (the one with bluetooth/zigbee/wifi, without light, powered by USB charger, not the one pluggable directly to socket). What I want to achieve is to connect doorbell with HA so pushing button will trigger event which will download snapshot from camera and send it on telegram.
From reading automation codes quoted above I see that it should be possible, but I am wondering how this bell is connected to HA in those examples? Directly via wifi? Via zigbee gateway ver.2 (the one pluggable to socket) ? My gateway doesn’t have developer/lan mode, so I can use it only as homekit integration in HA, I have however plugged CC2531 zigbee module in my raspberry and I already have few devices connected with it via zigbee2mqtt - f. e. magic cube, few temperature/humidity sensors. WIll it work with doorbell for me or I need to modify my setup once again?
I don’t think Xiaomi Doorbell wifi version is supported, it much easier to just install one wireless switch as doorbell with zigbee2mqtt and toggle automation based off that.
What do I have to do if I want it to also ring when I double-click the button and hold it down. Can I combine these into one or do I have to create an individual automation for each event