-
Notifications
You must be signed in to change notification settings - Fork 0
/
hass-outdoor-temp-01.yaml
69 lines (62 loc) · 1.74 KB
/
hass-outdoor-temp-01.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
substitutions:
name: hass-outdoor-temp-01
friendly_name: Outdoor 01
board: d1_mini
comment: D1 Mini - PT100 - OLED
packages:
common: !include packages/common-8266.yaml
spi:
clk_pin: D5
mosi_pin: D7
miso_pin: D6
sensor:
- platform: max31865
id: temperature
name: "${friendly_name} Temperature"
accuracy_decimals: 1
cs_pin: D3
reference_resistance: 430 Ω
rtd_nominal_resistance: 100 Ω
rtd_wires: 3
update_interval: 30s
mains_filter: 50HZ
filters:
- median:
window_size: 4
send_every: 2
send_first_at: 2
font:
- file: fonts/materialdesignicons-webfont.ttf
id: f_mdi
size: 16
glyphs:
- "\U000F0C5F" # mdi-close-network-outline
- "\U000F0C54" # mdi-check-network-outline
- file: gfonts://Azeret Mono@Medium
id: f_clock
size: 16
glyphs: '0123456789:'
- file: gfonts://Azeret Mono@Medium
id: f_temperature
size: 32
glyphs: -0123456789.°
display:
- platform: ssd1306_spi
model: "SSD1306 128x64"
contrast: 10%
cs_pin: D1
dc_pin: D2
reset_pin: D8
lambda: |-
it.filled_rectangle(0, 0, 128, 16);
it.strftime(128/2, 0, id(f_clock), COLOR_OFF, TextAlign::TOP_CENTER, "%H:%M:%S", id(hass_time).now());
if(id(system_status).state == false) {
it.print(128, 0, id(f_mdi), COLOR_OFF, TextAlign::TOP_RIGHT, "\U000F0C5F");
} else {
// it.print(128, 0, id(f_mdi), COLOR_OFF, TextAlign::TOP_RIGHT, "\U000F0C54");
}
if(!isnan(id(temperature).state)) {
it.printf(128/2, 48/2+16, id(f_temperature), TextAlign::CENTER, "%.1f°", id(temperature).state);
} else {
it.print(128/2, 48/2+16, id(f_temperature), TextAlign::CENTER, "--.-°");
}