diff --git a/esphome/ha-remote/ha-remote-1.bindings.yaml b/esphome/ha-remote/ha-remote-1.bindings.yaml index c65912b..f8cf204 100644 --- a/esphome/ha-remote/ha-remote-1.bindings.yaml +++ b/esphome/ha-remote/ha-remote-1.bindings.yaml @@ -41,16 +41,10 @@ text_sensor: 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)); + auto *btn = id(btn_family_room_standing_lamp); + lv_obj_set_style_text_color(btn, 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 @@ -141,20 +135,6 @@ text_sensor: 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 @@ -267,34 +247,6 @@ text_sensor: 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