domofon moved to esphome
This commit is contained in:
@@ -29,7 +29,14 @@ class Intercom(hass.Hass):
|
||||
self.ringtone = self.args['ringtone']
|
||||
self.listen_event(self.domofon_call, "domofon_call")
|
||||
self.listen_event(self.receive_telegram_callback, 'telegram_callback')
|
||||
# self.domofon_call(None, None, None)
|
||||
self.listen_state(self.sensor_trigger, self.args['sensor'])
|
||||
|
||||
def sensor_trigger(self, entity, attribute, old, new, kwargs):
|
||||
if new != "off":
|
||||
return
|
||||
self.log("domofon_call")
|
||||
self.domofon_call(None, None, None)
|
||||
|
||||
|
||||
def domofon_call(self, event_id, event_args, kwargs):
|
||||
self.log("domofon_call")
|
||||
|
||||
@@ -5,6 +5,7 @@ intercom:
|
||||
module: intercom
|
||||
class: Intercom
|
||||
notify: telegram
|
||||
sensor: binary_sensor.domofon_incoming_call
|
||||
gw_mac: !secret aqara1_mac
|
||||
chat_id: !secret telegram_group_chat
|
||||
global_dependencies:
|
||||
|
||||
Reference in New Issue
Block a user