Compare commits
No commits in common. "0abbd5ccf63197f3004ee0e62f106da7169d3685" and "04a77061ca30de8283bf1b1e2e4205c645fa49ce" have entirely different histories.
0abbd5ccf6
...
04a77061ca
2
esphome/.gitignore
vendored
2
esphome/.gitignore
vendored
@ -9,5 +9,3 @@
|
|||||||
**/platformio.ini
|
**/platformio.ini
|
||||||
**/partitions.csv
|
**/partitions.csv
|
||||||
/secrets.yaml
|
/secrets.yaml
|
||||||
.vscode/
|
|
||||||
|
|
||||||
|
@ -133,10 +133,6 @@ text_sensor:
|
|||||||
format: "%H:%M"
|
format: "%H:%M"
|
||||||
internal: True
|
internal: True
|
||||||
|
|
||||||
- platform: homeassistant
|
|
||||||
entity_id: sensor.moon
|
|
||||||
id: moonphase
|
|
||||||
|
|
||||||
# Webserver configuration entry
|
# Webserver configuration entry
|
||||||
web_server:
|
web_server:
|
||||||
port: 80
|
port: 80
|
||||||
@ -319,48 +315,6 @@ display:
|
|||||||
it.print(50, 115, id(sub_sensor_font), TextAlign::BASELINE_LEFT, "- hPa");
|
it.print(50, 115, id(sub_sensor_font), TextAlign::BASELINE_LEFT, "- hPa");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Moon phase display */
|
|
||||||
if(id(moonphase).has_state()) {
|
|
||||||
int x = 526;
|
|
||||||
int y = 276;
|
|
||||||
if (id(moonphase).state == "new_moon") {
|
|
||||||
// new moon
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "new moon");
|
|
||||||
} else if (id(moonphase).state == "waxing_crescent") {
|
|
||||||
// waxing crescent
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "waxing crescent");
|
|
||||||
} else if (id(moonphase).state == "first_quarter") {
|
|
||||||
// first_quarter
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "first quarter");
|
|
||||||
} else if (id(moonphase).state == "waxing_gibbous") {
|
|
||||||
// waxing gibbous
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "waxing gibbous");
|
|
||||||
} else if (id(moonphase).state == "full_moon") {
|
|
||||||
// full moon
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "full moon");
|
|
||||||
} else if (id(moonphase).state == "waning_gibbous") {
|
|
||||||
// waning gibbous
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "waning gibbous");
|
|
||||||
} else if (id(moonphase).state == "last_quarter") {
|
|
||||||
// last quarter
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "last quarter");
|
|
||||||
} else if (id(moonphase).state == "waning_crescent") {
|
|
||||||
// waning crescent
|
|
||||||
it.print(x, y, id(mdi_small), TextAlign::BASELINE_CENTER, "");
|
|
||||||
ESP_LOGI("Moonphase", "waning crescent");
|
|
||||||
} else {
|
|
||||||
// N/A
|
|
||||||
ESP_LOGE("Moonphase", "No data");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* INSIDE */
|
/* INSIDE */
|
||||||
|
|
||||||
int offsetY = 137;
|
int offsetY = 137;
|
||||||
|
Loading…
Reference in New Issue
Block a user