-
Notifications
You must be signed in to change notification settings - Fork 45
/
MQTTCarPresence.yaml
57 lines (57 loc) · 1.49 KB
/
MQTTCarPresence.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: MQTTCarPresence
author: aderusha (Luma)
description: Open garage door when car connects to Wi-Fi
source_url: https://github.com/aderusha/MQTTCarPresence/blob/master/MQTTCarPresence.yaml
domain: automation
homeassistant:
min_version: 2023.6.2
input:
garage_door:
name: Garage Door Cover
description: This cover is the Garage Door
selector:
entity:
filter:
- domain: cover
car_presence:
name: Car Presence Sensor
description: "This sensor is the car's connection to the MQTT broker"
selector:
entity:
filter:
- domain: binary_sensor
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: closed
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: open
sequence:
- service: cover.close_cover
entity_id: !input garage_door
default: []