refactor to use material design
This commit is contained in:
@@ -100,9 +100,18 @@ font:
|
||||
size: 24
|
||||
bpp: 4
|
||||
glyphs:
|
||||
# Tile icons
|
||||
- "\U000F0335" # mdi:lightbulb
|
||||
- "\U000F0425" # mdi:power
|
||||
- "\U000F0426" # mdi:power-plug
|
||||
# Navigation bar icons
|
||||
- "\U000F04B9" # mdi:sofa
|
||||
- "\U000F06B5" # mdi:lamp
|
||||
- "\U000F04DE" # mdi:stove
|
||||
- "\U000F12BD" # mdi:stairs-up
|
||||
- "\U000F1239" # mdi:desk
|
||||
- "\U000F06D9" # mdi:garage
|
||||
- "\U000F0531" # mdi:tree
|
||||
|
||||
# --- LVGL UI ---
|
||||
# Note: On ESP32-S3-Touch-LCD-7, GPIO14 is used by the RGB display bus,
|
||||
|
||||
@@ -14,7 +14,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003258) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_family_room_tv_stand);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -28,7 +28,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x390035) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_small_family_room_lamp);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -42,7 +42,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x690005) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_family_room_standing_lamp);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -56,7 +56,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003258) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_living_room_main_light);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -74,11 +74,16 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t off_color = lv_color_hex(0xE3E2E6);
|
||||
auto *btn1 = id(btn_living_room_patio_light);
|
||||
auto *btn2 = id(btn_outside_patio_light);
|
||||
lv_obj_set_style_text_color(btn1, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
lv_obj_set_style_text_color(btn2, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
if (x == "on") {
|
||||
lv_obj_set_style_text_color(btn1, lv_color_hex(0x2C1600), static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
lv_obj_set_style_text_color(btn2, lv_color_hex(0x003258), static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
} else {
|
||||
lv_obj_set_style_text_color(btn1, off_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
lv_obj_set_style_text_color(btn2, off_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_kitchen_sink_light
|
||||
entity_id: light.kitchen_sink_light
|
||||
@@ -90,7 +95,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003258) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_kitchen_sink_light);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -104,7 +109,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003258) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_office_lamp);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -118,7 +123,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x390035) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_office_led_strip);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -132,7 +137,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003258) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_garage_cam_light);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -146,7 +151,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x2C1600) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_office_echo_plug);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -160,7 +165,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003825) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_office_end_table_lamp_outlet);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -174,7 +179,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x381E72) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_office_wax_warmer_outlet);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -188,7 +193,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x390035) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_outside_lamppost_outlet_1);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -202,7 +207,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x2C1600) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_outside_lamppost_outlet_2);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -216,7 +221,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003825) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_outside_porch_decor_outlet);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -230,7 +235,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003825) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_living_room_garland_switch);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -244,7 +249,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x381E72) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_living_room_calendar_switch);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -258,7 +263,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x003258) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_upstairs_airquality_oled);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -272,7 +277,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x390035) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_upstairs_camera_motion);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -286,7 +291,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x390035) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_garage_fume_exhaust_fan);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
- platform: homeassistant
|
||||
@@ -300,7 +305,7 @@ text_sensor:
|
||||
state:
|
||||
checked: !lambda return x == "on";
|
||||
- lambda: |-
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF);
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x2C1600) : lv_color_hex(0xE3E2E6);
|
||||
auto *btn = id(btn_garage_resin_printer_heater);
|
||||
lv_obj_set_style_text_color(btn, text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user