-
Notifications
You must be signed in to change notification settings - Fork 0
/
MQTTCarPresence2.yml
61 lines (61 loc) · 1.43 KB
/
MQTTCarPresence2.yml
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
blueprint:
name: MQTTCarPresence2
author: aderusha (Luma)
description: Open garage door when car connects to Wi-Fi
source_url: https://raw.githubusercontent.com/aderusha/MQTTCarPresence/master/MQTTCarPresence.yaml
domain: automation
homeassistant:
min_version: 2023.6.2
input:
garage_door:
name: Test Light
description: This cover is the Garage Door
selector:
entity:
filter:
- domain:
- cover
multiple: false
car_presence:
name: Car Presence Sensor
description: This sensor is the car's connection to the MQTT broker
selector:
entity:
filter:
- domain:
- binary_sensor
multiple: false
mode: single
trigger:
- platform: state
entity_id: !input car_presence
to: 'on'
- platform: state
entity_id: !input car_presence
to: 'off'
for:
minutes: 1
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: !input car_presence
state: 'on'
- condition: state
entity_id: !input garage_door
state: on
sequence:
- service: cover.open_cover
entity_id: !input garage_door
- conditions:
- condition: state
entity_id: !input car_presence
state: 'off'
- condition: state
entity_id: !input garage_door
state: off
sequence:
- service: cover.close_cover
entity_id: !input garage_door
default: []