updated text colors
This commit is contained in:
@@ -17,6 +17,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001A33) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_small_family_room_lamp
|
||||
entity_id: light.small_family_room_lamp
|
||||
@@ -31,6 +34,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x22001F) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_living_room_lamp_1
|
||||
entity_id: light.living_room_lamp_1
|
||||
@@ -45,6 +51,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x3D0002) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_living_room_light_2
|
||||
entity_id: light.living_room_light_2
|
||||
@@ -59,6 +68,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001A33) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_patio_light_1
|
||||
entity_id: light.patio_light_1
|
||||
@@ -79,10 +91,22 @@ text_sensor:
|
||||
auto *btn2 = id(btn_outside_patio_light);
|
||||
if (x == "on") {
|
||||
lv_obj_set_style_text_color(btn1, lv_color_hex(0x1A0C00), static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn1); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn1, i), lv_color_hex(0x1A0C00), static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
lv_obj_set_style_text_color(btn2, lv_color_hex(0x001A33), static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn2); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn2, i), lv_color_hex(0x001A33), 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn1); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn1, i), 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn2); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn2, i), off_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_kitchen_sink_light
|
||||
@@ -98,6 +122,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001A33) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_office_lamp_2
|
||||
entity_id: light.office_lamp_2
|
||||
@@ -112,6 +139,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001A33) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_office_led_strip
|
||||
entity_id: light.led_strip_controller_led_strip_controller
|
||||
@@ -126,6 +156,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x22001F) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_garage_cam_light
|
||||
entity_id: light.esp32_saturn4_cam_esp32_saturn4_cam_light
|
||||
@@ -140,6 +173,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001A33) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_office_echo_plug
|
||||
entity_id: switch.office_echo_plug
|
||||
@@ -154,6 +190,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x1A0C00) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_office_end_table_lamp_outlet
|
||||
entity_id: switch.office_end_table_lamp_socket_1
|
||||
@@ -168,6 +207,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001F15) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_office_wax_warmer_outlet
|
||||
entity_id: switch.office_wax_warmer_socket_1
|
||||
@@ -182,6 +224,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x1E0F3F) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_outside_lamppost_outlet_1
|
||||
entity_id: switch.lamppost_outlets_socket_1
|
||||
@@ -196,6 +241,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x22001F) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_outside_lamppost_outlet_2
|
||||
entity_id: switch.lamppost_outlets_socket_2
|
||||
@@ -210,6 +258,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x1A0C00) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_outside_porch_decor_outlet
|
||||
entity_id: switch.washing_machine_socket_1
|
||||
@@ -224,6 +275,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001F15) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_living_room_garland_switch
|
||||
entity_id: switch.big_family_room_lamp
|
||||
@@ -238,6 +292,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001F15) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_living_room_calendar_switch
|
||||
entity_id: switch.digital_calendar
|
||||
@@ -252,6 +309,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x1E0F3F) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_upstairs_airquality_oled
|
||||
entity_id: switch.airqualitysensor_3_oled_power
|
||||
@@ -266,6 +326,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x001A33) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_upstairs_camera_motion
|
||||
entity_id: switch.upstairs_camera_motion_detection
|
||||
@@ -280,6 +343,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x22001F) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_garage_fume_exhaust_fan
|
||||
entity_id: switch.fume_exhaust_fan
|
||||
@@ -294,6 +360,9 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x22001F) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: ts_garage_resin_printer_heater
|
||||
entity_id: switch.resin_printer_heater
|
||||
@@ -308,4 +377,7 @@ text_sensor:
|
||||
const lv_color_t text_color = (x == "on") ? lv_color_hex(0x1A0C00) : 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));
|
||||
for (uint32_t i = 0; i < lv_obj_get_child_cnt(btn); i++) {
|
||||
lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, static_cast<lv_style_selector_t>(LV_PART_MAIN | LV_STATE_DEFAULT));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user