|
|
|
@ -24,6 +24,10 @@ globals:
|
|
|
|
|
type: bool
|
|
|
|
|
restore_value: no
|
|
|
|
|
initial_value: 'false'
|
|
|
|
|
- id: initial_data_received
|
|
|
|
|
type: bool
|
|
|
|
|
restore_value: no
|
|
|
|
|
initial_value: 'false'
|
|
|
|
|
|
|
|
|
|
time:
|
|
|
|
|
- platform: homeassistant
|
|
|
|
@ -35,6 +39,7 @@ time:
|
|
|
|
|
condition:
|
|
|
|
|
lambda: 'return id(data_updated) == true;'
|
|
|
|
|
then:
|
|
|
|
|
- lambda: 'id(initial_data_received) = true;'
|
|
|
|
|
- logger.log: "Sensor data updated: Refreshing display..."
|
|
|
|
|
- component.update: eink_display
|
|
|
|
|
- lambda: 'id(data_updated) = false;'
|
|
|
|
@ -399,6 +404,12 @@ display:
|
|
|
|
|
// Fill background in black.
|
|
|
|
|
it.fill(color_black);
|
|
|
|
|
|
|
|
|
|
if (id(initial_data_received) == false) {
|
|
|
|
|
// ATTENTION!
|
|
|
|
|
// Please adjust coordinates I have a different display!
|
|
|
|
|
// ATTENTION!
|
|
|
|
|
it.printf(0, 420, id(font_small_bold), color_white, TextAlign::TOP_CENTER, "Waiting for data...");
|
|
|
|
|
} else {
|
|
|
|
|
// Weather Section
|
|
|
|
|
it.image(0, 88, id(title_weather));
|
|
|
|
|
|
|
|
|
@ -438,5 +449,5 @@ display:
|
|
|
|
|
it.printf(330, 652, id(font_medium_bold), color_white, TextAlign::TOP_CENTER, "%2.0f MIN", id(train_canarsie_next_train_due_in).state);
|
|
|
|
|
it.printf(150, 684, id(font_small_book), color_white, TextAlign::TOP_CENTER, "%s", id(train_manhattan_next_train_due_at).state.c_str());
|
|
|
|
|
it.printf(330, 684, id(font_small_book), color_white, TextAlign::TOP_CENTER, "%s", id(train_canarsie_next_train_due_at).state.c_str());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
captive_portal:
|