-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtx_ultimate_02_camera_emanuele.yaml
76 lines (62 loc) · 1.72 KB
/
tx_ultimate_02_camera_emanuele.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
substitutions:
name: "interruttore-camera-emanuele"
friendly_name: "Camera Emanuele"
use_ip_address: 192.168.2.142 # Usato da esphome per monitor e upload
wifi_ssid: !secret wifi_dmz_ssid
wifi_password: !secret wifi_dmz_password
#esp32_ble_tracker:
# scan_parameters:
# active: True
# continuous: false
packages:
# Connessione MQTT
mqtt_client: !include includes/mqtt_client.yaml
# Configurazione di base
device_base: !include includes/tx_ultimate_base.yaml
# Supporto Voice Assistant
va: !include
file: includes/tx_ultimate_voice_assistant.yaml
vars:
mic_lrclk_pin: GPIO1
mic_bclk_pin: GPIO3
mic_sdata_pin: GPIO0
# Configurazione leds
leds: !include includes/tx_ultimate_leds_2_zone.yaml
# Relè e luci locali
light_1: !include
file: includes/tx_ultimate_mqtt_relay.yaml
vars:
id: relay_1
relay_index: 0
subscribe_topic: "sonoff_r3_03/stat/RESULT"
value_on: "ON"
mqtt_json_key: "POWER"
command_topic: "sonoff_r3_03/cmnd/POWER"
command_toggle: "TOGGLE"
light_2: !include
file: includes/tx_ultimate_light.yaml
vars:
id: relay_2
relay_index: 1
name: "Camera Emanuele"
pin: ${relay_1_pin}
script:
- id: !extend on_release
then:
- if:
condition:
lambda: "return index == 0;"
then:
- script.execute: mqtt_toggle_relay_1
else:
- light.toggle: relay_2
- id: !extend on_swipe_left
then:
- mqtt.publish:
topic: sonoff_dualr2_06/cmnd/ShutterStopOpen1
payload: ""
- id: !extend on_swipe_right
then:
- mqtt.publish:
topic: sonoff_dualr2_06/cmnd/ShutterStopClose1
payload: ""