-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathMQTT_Tasmota_CarPresence.yaml
57 lines (57 loc) · 1.5 KB
/
MQTT_Tasmota_CarPresence.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
blueprint:
name: MQTT_Tasmota_CarPresence
author: SirGoodenough
description: Open garage door when car connects to Wi-Fi
source_url: https://github.com/aderusha/MQTTCarPresence/blob/master/MQTT_Tasmota_CarPresence.yaml
domain: automation
homeassistant:
min_version: 2023.6.2
input:
garage_door:
name: Garage Door
description: This cover is the Garage Door
selector:
entity:
filter:
- domain: cover
car_presence:
name: Car Presence
description: "This switch is the car's connection to the MQTT broker"
selector:
entity:
filter:
- domain: switch
mode: single
trigger:
- platform: state
entity_id: !input car_presence
to: 'on'
- platform: state
entity_id: !input car_presence
to: 'unavailable'
for:
minutes: 1
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: !input car_presence
state: 'on'
- condition: state
entity_id: !input garage_door
state: closed
sequence:
- service: cover.open_cover
entity_id: !input garage_door
- conditions:
- condition: state
entity_id: !input car_presence
state: 'unavailable'
- condition: state
entity_id: !input garage_door
state: open
sequence:
- service: cover.close_cover
entity_id: !input garage_door
default: []