-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgarage-esphome
95 lines (77 loc) · 2.02 KB
/
garage-esphome
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
esphome:
name: garagetest
platform: ESP8266
board: nodemcuv2
wifi:
ssid: ""
password: ""
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Garagetest Fallback Hotspot"
password: ""
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: ""
ota:
password: ""
time:
- platform: homeassistant
id: esptime
font:
- file: 'arial.ttf'
id: font3
size: 15
sensor:
- platform: dht
pin: D7
temperature:
name: "Garage Temperature"
filters:
- offset: -1.0
humidity:
name: "Garage Humidity"
update_interval: 60s
model: AM2302
- platform: homeassistant
id: garage_ha_temperature
entity_id: sensor.garage_temperature
internal: true
- platform: homeassistant
id: garage_ha_humidity
entity_id: sensor.garage_humidity
internal: true
- platform: homeassistant
id: outside_temperature
entity_id: sensor.aussentemperatur
internal: true
i2c:
sda: D1
scl: D2
scan: False
display:
- platform: ssd1306_i2c
model: "SH1106 128x64"
reset_pin: D0
address: 0x3C
lambda: |-
if (id(garage_ha_temperature).has_state()) {
it.printf(127, 0, id(font3), TextAlign::TOP_RIGHT , "%.1f°", id(garage_ha_temperature).state);
}
if (id(garage_ha_temperature).has_state()) {
it.printf(0, 0, id(font3), TextAlign::TOP_LEFT , "Garage T:");
}
if (id(garage_ha_temperature).has_state()) {
it.printf(127, 23, id(font3), TextAlign::TOP_RIGHT , "%.1f%%", id(garage_ha_humidity).state);
}
if (id(garage_ha_temperature).has_state()) {
it.printf(0, 23, id(font3), TextAlign::TOP_LEFT , "Garage LF:");
}
if (id(outside_temperature).has_state()) {
it.printf(127, 60, id(font3), TextAlign::BASELINE_RIGHT , "%.1f°", id(outside_temperature).state);
}
if (id(outside_temperature).has_state()) {
it.printf(0, 60, id(font3), TextAlign::BASELINE_LEFT , "Aussen T:");
}