text_sensor: - platform: wifi_info ip_address: name: "HA Remote IP" id: ip_addr - platform: homeassistant id: ts_family_room_tv_stand entity_id: light.family_room_tv_stand internal: true on_value: then: - lvgl.widget.update: id: btn_family_room_tv_stand state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_family_room_tv_stand); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_small_family_room_lamp entity_id: light.small_family_room_lamp internal: true on_value: then: - lvgl.widget.update: id: btn_small_family_room_lamp state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_small_family_room_lamp); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_living_room_lamp_1 entity_id: light.living_room_lamp_1 internal: true on_value: then: - lvgl.widget.update: id: btn_family_room_standing_lamp state: checked: !lambda return x == "on"; - lvgl.widget.update: id: btn_living_room_standing_lamp state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn1 = id(btn_family_room_standing_lamp); auto *btn2 = id(btn_living_room_standing_lamp); lv_obj_set_style_text_color(btn1, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); lv_obj_set_style_text_color(btn2, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_living_room_light_2 entity_id: light.living_room_light_2 internal: true on_value: then: - lvgl.widget.update: id: btn_living_room_main_light state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_living_room_main_light); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_patio_light_1 entity_id: light.patio_light_1 internal: true on_value: then: - lvgl.widget.update: id: btn_living_room_patio_light state: checked: !lambda return x == "on"; - lvgl.widget.update: id: btn_outside_patio_light state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); 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_PART_MAIN | LV_STATE_DEFAULT)); lv_obj_set_style_text_color(btn2, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_kitchen_sink_light entity_id: light.kitchen_sink_light internal: true on_value: then: - lvgl.widget.update: id: btn_kitchen_sink_light state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_kitchen_sink_light); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_office_lamp_2 entity_id: light.office_lamp_2 internal: true on_value: then: - lvgl.widget.update: id: btn_office_lamp state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_office_lamp); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_office_led_strip entity_id: light.led_strip_controller_led_strip_controller internal: true on_value: then: - lvgl.widget.update: id: btn_office_led_strip state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_office_led_strip); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_garage_cam_light entity_id: light.esp32_saturn4_cam_esp32_saturn4_cam_light internal: true on_value: then: - lvgl.widget.update: id: btn_garage_cam_light state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_garage_cam_light); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_family_room_standing_fan_outlet entity_id: switch.standing_fan_socket_1 internal: true on_value: then: - lvgl.widget.update: id: btn_family_room_standing_fan_outlet state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_family_room_standing_fan_outlet); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_office_echo_plug entity_id: switch.office_echo_plug internal: true on_value: then: - lvgl.widget.update: id: btn_office_echo_plug state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_office_echo_plug); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_office_end_table_lamp_outlet entity_id: switch.office_end_table_lamp_socket_1 internal: true on_value: then: - lvgl.widget.update: id: btn_office_end_table_lamp_outlet state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_office_end_table_lamp_outlet); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_office_wax_warmer_outlet entity_id: switch.office_wax_warmer_socket_1 internal: true on_value: then: - lvgl.widget.update: id: btn_office_wax_warmer_outlet state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_office_wax_warmer_outlet); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_outside_lamppost_outlet_1 entity_id: switch.lamppost_outlets_socket_1 internal: true on_value: then: - lvgl.widget.update: id: btn_outside_lamppost_outlet_1 state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_outside_lamppost_outlet_1); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_outside_lamppost_outlet_2 entity_id: switch.lamppost_outlets_socket_2 internal: true on_value: then: - lvgl.widget.update: id: btn_outside_lamppost_outlet_2 state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_outside_lamppost_outlet_2); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_outside_porch_decor_outlet entity_id: switch.washing_machine_socket_1 internal: true on_value: then: - lvgl.widget.update: id: btn_outside_porch_decor_outlet state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_outside_porch_decor_outlet); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_living_room_garland_switch entity_id: switch.big_family_room_lamp internal: true on_value: then: - lvgl.widget.update: id: btn_living_room_garland_switch state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_living_room_garland_switch); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_living_room_calendar_switch entity_id: switch.digital_calendar internal: true on_value: then: - lvgl.widget.update: id: btn_living_room_calendar_switch state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_living_room_calendar_switch); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_kitchen_dnd_switch entity_id: switch.kitchen_do_not_disturb_switch internal: true on_value: then: - lvgl.widget.update: id: btn_kitchen_dnd_switch state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_kitchen_dnd_switch); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_kitchen_camera_motion entity_id: switch.kitchen_camera_motion_detection internal: true on_value: then: - lvgl.widget.update: id: btn_kitchen_camera_motion state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_kitchen_camera_motion); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_upstairs_airquality_oled entity_id: switch.airqualitysensor_3_oled_power internal: true on_value: then: - lvgl.widget.update: id: btn_upstairs_airquality_oled state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_upstairs_airquality_oled); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_upstairs_camera_motion entity_id: switch.upstairs_camera_motion_detection internal: true on_value: then: - lvgl.widget.update: id: btn_upstairs_camera_motion state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_upstairs_camera_motion); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_garage_fume_exhaust_fan entity_id: switch.fume_exhaust_fan internal: true on_value: then: - lvgl.widget.update: id: btn_garage_fume_exhaust_fan state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_garage_fume_exhaust_fan); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT)); - platform: homeassistant id: ts_garage_resin_printer_heater entity_id: switch.resin_printer_heater internal: true on_value: then: - lvgl.widget.update: id: btn_garage_resin_printer_heater state: checked: !lambda return x == "on"; - lambda: |- const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); auto *btn = id(btn_garage_resin_printer_heater); lv_obj_set_style_text_color(btn, text_color, static_cast(LV_PART_MAIN | LV_STATE_DEFAULT));