|
1 | 1 | substitutions:
|
2 | 2 | devicename: weatherstation
|
3 | 3 | location_id: livingroom
|
4 |
| - location_name: 客厅 |
| 4 | + location_name: Living Room |
5 | 5 | domoticz_device_id: "95"
|
6 | 6 |
|
7 | 7 | <<: !include weatherstation/base.yaml
|
8 | 8 |
|
9 | 9 | sensor: !include_dir_list weatherstation/living_room/sensors/
|
10 | 10 | interval: !include_dir_list weatherstation/living_room/automations/
|
11 | 11 |
|
12 |
| -time: |
13 |
| - - platform: sntp |
14 |
| - id: sntp_time |
15 |
| - timezone: Asia/Shanghai |
16 |
| - |
17 |
| -font: |
18 |
| - - file: 'fonts/slkscr.ttf' |
19 |
| - id: font1 |
20 |
| - size: 8 |
21 |
| - - file: 'fonts/BebasNeue-Regular.ttf' |
22 |
| - id: font2 |
23 |
| - size: 48 |
24 |
| - - file: 'fonts/arial.ttf' |
25 |
| - id: font3 |
26 |
| - size: 14 |
27 |
| - |
28 |
| -display: |
29 |
| - - platform: ssd1306_i2c |
30 |
| - model: "SSD1306 128x64" |
31 |
| - reset_pin: D0 |
32 |
| - address: 0x3C |
33 |
| - lambda: |- |
34 |
| - it.printf(64, 0, id(font1), TextAlign::TOP_CENTER, "Living Room"); |
35 |
| -
|
36 |
| - // Print time in HH:MM format |
37 |
| - it.strftime(0, 60, id(font2), TextAlign::BASELINE_LEFT, "%H:%M", id(sntp_time).now()); |
38 |
| -
|
39 |
| - // Print temperature |
40 |
| - if (id(${devicename}_${location_id}_temp).has_state()) { |
41 |
| - it.printf(127, 23, id(font3), TextAlign::TOP_RIGHT , "%.1f°", id(${devicename}_${location_id}_temp).state); |
42 |
| - } |
43 |
| -
|
44 |
| - // Print humidity |
45 |
| - if (id(${devicename}_${location_id}_hum).has_state()) { |
46 |
| - it.printf(127, 60, id(font3), TextAlign::BASELINE_RIGHT , "%.1f%%", id(${devicename}_${location_id}_hum).state); |
47 |
| - } |
| 12 | +# time: |
| 13 | +# - platform: sntp |
| 14 | +# id: sntp_time |
| 15 | +# timezone: Asia/Shanghai |
| 16 | +# |
| 17 | +# font: |
| 18 | +# - file: 'fonts/slkscr.ttf' |
| 19 | +# id: font1 |
| 20 | +# size: 8 |
| 21 | +# - file: 'fonts/BebasNeue-Regular.ttf' |
| 22 | +# id: font2 |
| 23 | +# size: 48 |
| 24 | +# - file: 'fonts/arial.ttf' |
| 25 | +# id: font3 |
| 26 | +# size: 14 |
| 27 | +# |
| 28 | +# display: |
| 29 | +# - platform: ssd1306_i2c |
| 30 | +# model: "SSD1306 128x64" |
| 31 | +# reset_pin: D0 |
| 32 | +# address: 0x3C |
| 33 | +# lambda: |- |
| 34 | +# it.printf(64, 0, id(font1), TextAlign::TOP_CENTER, "Living Room"); |
| 35 | +# |
| 36 | +# // Print time in HH:MM format |
| 37 | +# it.strftime(0, 60, id(font2), TextAlign::BASELINE_LEFT, "%H:%M", id(sntp_time).now()); |
| 38 | +# |
| 39 | +# // Print temperature |
| 40 | +# if (id(${devicename}_${location_id}_temp).has_state()) { |
| 41 | +# it.printf(127, 23, id(font3), TextAlign::TOP_RIGHT , "%.1f°", id(${devicename}_${location_id}_temp).state); |
| 42 | +# } |
| 43 | +# |
| 44 | +# // Print humidity |
| 45 | +# if (id(${devicename}_${location_id}_hum).has_state()) { |
| 46 | +# it.printf(127, 60, id(font3), TextAlign::BASELINE_RIGHT , "%.1f%%", id(${devicename}_${location_id}_hum).state); |
| 47 | +# } |
0 commit comments