-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinputs.yaml
71 lines (70 loc) · 1.59 KB
/
inputs.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
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2023 Ilia Sotnikov
---
binary_sensor:
- platform: gpio
id: ${rain_sensor_id}
pin:
number: GPIO0
mode:
pullup: true
input: true
inverted: ${rain_sensor_inverted}
name: "Rain sensor"
icon: "mdi:weather-pouring"
filters:
- delayed_on: 100ms
- delayed_off: 100ms
publish_initial_state: true
on_state:
then:
- lambda: !include
file: script_rain_water_tank_sensors_action.yaml
vars:
triggered_by: ${rain_sensor_id}
- platform: gpio
id: ${water_tank_empty_id}
pin:
number: GPIO1
mode:
pullup: true
input: true
inverted: ${water_tank_empty_inverted}
name: "Water tank empty"
icon: "mdi:water-off"
filters:
- delayed_on: 100ms
- delayed_off: 100ms
publish_initial_state: true
on_state:
then:
- lambda: !include
file: script_rain_water_tank_sensors_action.yaml
vars:
triggered_by: ${water_tank_empty_id}
- platform: gpio
internal: true
pin:
number: GPIO4
mode:
pullup: true
input: true
inverted: true
name: "Sensor 3"
filters:
- delayed_on: 100ms
- delayed_off: 100ms
publish_initial_state: true
- platform: gpio
internal: true
pin:
number: GPIO5
mode:
pullup: true
input: true
inverted: true
name: "Sensor 4"
filters:
- delayed_on: 100ms
- delayed_off: 100ms
publish_initial_state: true