mirror of
https://github.com/Anonym-tsk/smart-domofon.git
synced 2026-01-06 16:49:09 +03:00
Removed HA services
This commit is contained in:
@@ -58,6 +58,8 @@ wifi:
|
||||
ssid: $ap_ssid
|
||||
password: $ap_password
|
||||
|
||||
captive_portal:
|
||||
|
||||
logger:
|
||||
baud_rate: 0
|
||||
logs:
|
||||
@@ -100,30 +102,6 @@ api:
|
||||
password: $api_password
|
||||
reboot_timeout: 0s
|
||||
services:
|
||||
# Accept call service for Home Assistant
|
||||
- service: accept_call
|
||||
then:
|
||||
- logger.log: "Call service 'Accept Call'"
|
||||
- if:
|
||||
condition:
|
||||
binary_sensor.is_on: incoming_call
|
||||
then:
|
||||
script.execute: call_accept
|
||||
else:
|
||||
logger.log: "No incoming call"
|
||||
|
||||
# Reject call service for Home Assistant
|
||||
- service: reject_call
|
||||
then:
|
||||
- logger.log: "Call service 'Reject Call'"
|
||||
- if:
|
||||
condition:
|
||||
binary_sensor.is_on: incoming_call
|
||||
then:
|
||||
script.execute: call_reject
|
||||
else:
|
||||
logger.log: "No incoming call"
|
||||
|
||||
# Led brightness
|
||||
- service: set_brightness
|
||||
variables:
|
||||
@@ -497,6 +475,8 @@ switch:
|
||||
binary_sensor.is_on: incoming_call
|
||||
then:
|
||||
script.execute: call_accept
|
||||
else:
|
||||
logger.log: "No incoming call"
|
||||
|
||||
# Reject call
|
||||
- platform: template
|
||||
@@ -509,6 +489,8 @@ switch:
|
||||
binary_sensor.is_on: incoming_call
|
||||
then:
|
||||
script.execute: call_reject
|
||||
else:
|
||||
logger.log: "No incoming call"
|
||||
|
||||
# RGB Led (not exported to Home Assistant)
|
||||
light:
|
||||
|
||||
@@ -27,7 +27,7 @@ automation:
|
||||
data_template:
|
||||
callback_query_id: "{{ trigger.event.data.id }}"
|
||||
message: "{{ 'Открываю...' if is_state('binary_sensor.domofon_incoming_call', 'on') else 'Нет входящего звонка' }}"
|
||||
- service: esphome.domofon_accept_call
|
||||
- switch.turn_on: switch.domofon_accept_call
|
||||
|
||||
- alias: Telegram /domofon_reject callback
|
||||
initial_state: true
|
||||
@@ -41,7 +41,7 @@ automation:
|
||||
data_template:
|
||||
callback_query_id: "{{ trigger.event.data.id }}"
|
||||
message: "{{ 'Отклоняю...' if is_state('binary_sensor.domofon_incoming_call', 'on') else 'Нет входящего звонка' }}"
|
||||
- service: esphome.domofon_reject_call
|
||||
- switch.turn_on: switch.domofon_reject_call
|
||||
|
||||
- alias: Domofon opened by button notification
|
||||
initial_state: true
|
||||
|
||||
Reference in New Issue
Block a user