platform: st7789v
id: st7789vdisplay
reset_pin: GPIO23
dc_pin: GPIO16
cs_pin: GPIO5
backlight_pin: GPIO4
brightness: 25%
update_interval: 5s
lambda: |-
it.set_rotation(DISPLAY_ROTATION_0_DEGREES);
//Icon
if (id(curent_weather).state == “clear-night”)
{
it.image(5, 5, id(wpng_1));
}
else if (id(curent_weather).state == “cloudy”)
{
it.image(5, 5, id(wpng_2));
}
else if (id(curent_weather).state == “fog”)
{
it.image(5, 5, id(wpng_3));
}
else if (id(curent_weather).state == “hail”)
{
it.image(5, 5, id(wpng_4));
}
else if (id(curent_weather).state == “lightning”)
{
it.image(5, 5, id(wpng_5));
}
else if (id(curent_weather).state == “lightning-rainy”)
{
it.image(5, 5, id(wpng_6));
}
else if (id(curent_weather).state == “partlycloudy”)
{
it.image(5, 5, id(wpng_7));
}
else if (id(curent_weather).state == “pouring”)
{
it.image(5, 5, id(wpng_8));
}
else if (id(curent_weather).state == “rainy”)
{
it.image(5, 5, id(wpng_9));
}
else if (id(curent_weather).state == “snowy”)
{
it.image(5, 5, id(wpng_10));
}
else if (id(curent_weather).state == “snowy-rainy’”)
{
it.image(5, 5, id(wpng_11));
}
else if (id(curent_weather).state == “sunny”)
{
it.image(5, 5, id(wpng_12));
}
else if (id(curent_weather).state == “windy”)
{
it.image(5, 5, id(wpng_13));
}
else if (id(curent_weather).state == “windy-variant”)
{
it.image(5, 5, id(wpng_14));
}
else if (id(curent_weather).state == “exceptional”)
{
it.image(5, 5, id(wpng_15));
}
else
{
it.image(5, 5, id(wpng_0));
}
//Temperature
if (id(curent_temp).has_state())
{
it.printf(95, 204, id(font2), 0xFFFF, TextAlign::BASELINE_RIGHT, "%.0f", id(curent_temp).state);
}
it.printf(100, 124, id(font3), 0xFFFF, "o");
it.printf(105, 174, id(font4), 0xFFFF, "F");
// it.printf(105, 174, id(font4), 0xFFFF, “C”);
//Time
it.strftime(67, 235, id(font1), 0x767E, TextAlign::BASELINE_CENTER, "%H:%M", id(esptime).now());