Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.79k stars 50 forks source link

Memory leak problem #612

Closed xiayesuifeng closed 2 months ago

xiayesuifeng commented 3 months ago

Describe the bug
There seems to be a memory leak, the memory usage of the tab will continue to increase until the tab crashes, and the CPU usage will become very high after a while. And it only takes a few minutes for the page to become very stuck. If you enter edit mode, the memory leak will be more serious and the page will be stuck.

Screenshots
https://github.com/Clooos/Bubble-Card/assets/8142265/69f16570-781f-44d5-a9e5-ab6efc5f3bfb

YAML
If applicable, add any relevant YAML code.

title: test
path: test
type: sections
sections:
  - type: grid
    cards:
      - type: custom:bubble-card
        card_type: button
        button_type: state
        card_layout: large-2-rows
        name: Energy
        entity: sensor.solar_system_module_pv_power
        icon: mdi:home-lightning-bolt-outline
        show_state: true
        button_action:
          tap_action:
            action: navigate
            navigation_path: "#energy"
        sub_button:
          - entity: sensor.solar_system_module_inverter_output_voltage
            icon: mdi:counter
            show_background: false
            show_state: true
            tap_action:
              action: more-info
          - entity: sensor.pv_power_total_day
            show_state: true
            show_background: false
          - entity: sensor.solar_system_module_inverter_output_mode
            show_background: false
            show_state: true
          - entity: sensor.pv_power_total_week
            show_state: true
            show_background: false
            icon: mdi:calendar-week
        styles: ""
      - type: custom:bubble-card
        card_type: button
        button_type: state
        card_layout: large-2-rows
        name: 热水器
        entity: sensor.water_heater_currenttemperature
        icon: mdi:thermometer-water
        show_state: true
        button_action:
          tap_action:
            action: navigate
            navigation_path: "#energy"
        sub_button:
          - icon: mdi:thermometer
            show_background: false
            show_state: true
            tap_action:
              action: more-info
            entity: number.water_heater_targettemperature
            name: ""
            show_attribute: false
            show_icon: true
          - entity: sensor.zero_cold_water_system_1_water_temperature
            show_state: true
            show_background: false
          - show_background: false
            show_state: true
            entity: sensor.water_heater_workstatus
            show_icon: true
            icon: mdi:list-status
          - entity: sensor.zero_cold_water_system_1_status
            show_background: false
            show_name: false
            show_icon: true
            show_attribute: true
            show_last_changed: false
            show_state: true
            icon: mdi:list-status
          - entity: switch.water_heater_onoffstatus
            icon: mdi:power
            show_name: true
            name: 热水器
            tap_action:
              action: toggle
          - entity: switch.zero_cold_water_system_switch_circulation_pump
            show_state: false
            show_background: true
            icon: mdi:power
            name: 循环泵
            show_name: true
            tap_action:
              action: toggle
        styles: ""
        show_attribute: false
      - square: false
        type: grid
        cards:
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: F1 大厅
            icon: mdi:sofa
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f1_livingroom_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f2-livingroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: F2 客厅
            icon: mdi:sofa
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f2_livingroom_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
              - entity: media_player.sony_xr_75x95el_2
                icon: mdi:youtube-tv
                tap_action:
                  action: toggle
              - entity: fan.211106241022386_fan
                show_name: false
                tap_action:
                  action: toggle
                double_tap_action:
                  action: none
                hold_action:
                  action: more-info
              - entity: cover.dooya_f2_livingroom_balcony_cover
                icon: mdi:curtains
                tap_action:
                  action: toggle
                show_background: true
                show_icon: true
                hold_action:
                  action: more-info
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f2-livingroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: F2 头房
            icon: mdi:bed
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f2_front_bedroom_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
              - icon: ""
                tap_action:
                  action: toggle
                show_background: true
                show_icon: true
                hold_action:
                  action: more-info
                entity: climate.f2_front_bedroom_climate
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f2-front-bedroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: F2 尾房
            icon: mdi:bed
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f2_back_bedroom_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
              - icon: mdi:curtains
                tap_action:
                  action: toggle
                show_background: true
                show_icon: true
                hold_action:
                  action: more-info
                entity: cover.dooya_f2_bedroom_2_cover
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f2-back-bedroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: F3 客厅
            icon: mdi:sofa
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f3_livingroom_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
              - entity: cover.f3_livingroom_covers
                icon: mdi:curtains
                tap_action:
                  action: toggle
                show_background: true
                show_icon: true
                hold_action:
                  action: more-info
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f3-livingroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: F3 头房
            icon: mdi:bed
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f3_front_bedroom_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
              - entity: cover.dooya_f3_front_bedroom_cover
                icon: mdi:curtains
                tap_action:
                  action: toggle
                show_background: true
                show_icon: true
                hold_action:
                  action: more-info
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f3-front-bedroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: F3 尾房
            icon: mdi:bed
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f3_back_bedroom_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
              - entity: cover.f3_back_bedroom_covers
                icon: mdi:curtains
                tap_action:
                  action: toggle
                show_background: true
                show_icon: true
                hold_action:
                  action: more-info
              - entity: climate.f3_wei_fang_leng_qi
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f3-back-bedroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: 客房
            icon: mdi:bed
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f4_guest_room_lights
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f4-guestroom"
          - type: custom:bubble-card
            card_type: button
            button_type: name
            name: 家庭影院
            icon: mdi:youtube-tv
            show_icon: true
            show_name: true
            scrolling_effect: true
            card_layout: normal
            styles: |
              .bubble-button-card-container {
                height: 100px;
              }

              .bubble-button-card,
              .bubble-range-slider,
              .bubble-button-background {
                flex-wrap: wrap;
              }

              .bubble-sub-button-container {
                justify-content: center;
                width: 100%;
                bottom: 8px;
                left: 0px;
              }
            sub_button:
              - entity: light.f4_home_cinema_lights_fully_on_off
                name: ""
                show_name: false
                show_background: true
                icon: mdi:lightbulb-group
                tap_action:
                  action: toggle
              - entity: cover.dooya_f4_home_cinema_cover
                icon: mdi:curtains
                tap_action:
                  action: toggle
                show_background: true
                show_icon: true
                hold_action:
                  action: more-info
            button_action:
              tap_action:
                action: navigate
                navigation_path: "#f3-front-bedroom"
        columns: 2
        title: 区域
      - type: vertical-stack
        cards:
          - type: custom:bubble-card
            card_type: pop-up
            button_type: state
            entity: climate.feng_guan_ji
            hash: "#f2-livingroom"
            name: F2 客厅
            icon: mdi:sofa
            show_last_changed: false
            show_state: false
            tap_action:
              action: none
            card_layout: normal
            show_attribute: true
            attribute: current_temperature
          - type: custom:bubble-card
            card_type: separator
            name: 情景模式
            icon: mdi:card-outline
          - type: horizontal-stack
            cards:
              - type: custom:bubble-card
                card_type: button
                entity: switch.f2_ke_ting_ming_liang_mo_shi_stateful_scene
                name: 明亮
                card_layout: large
                show_icon: true
                icon: mdi:lightbulb-group
              - type: custom:bubble-card
                card_type: button
                entity: switch.f2_ke_ting_xiu_xian_mo_shi_stateful_scene
                card_layout: large
                name: 休闲
                icon: mdi:sofa
              - type: custom:bubble-card
                card_type: button
                entity: switch.f2_ke_ting_guan_ying_mo_shi_stateful_scene
                name: 观影
                card_layout: large
                show_icon: true
                icon: mdi:youtube-tv
          - type: custom:bubble-card
            card_type: separator
            name: 灯光
            icon: mdi:lightbulb-group
            sub_button:
              - entity: light.f2_livingroom_lights_fully_on_off
                show_icon: true
                show_background: true
                tap_action:
                  action: toggle
          - square: false
            type: grid
            cards:
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_1_left_light_strip
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_1_right_light_strip
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_1_left_downlight
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_1_grile_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_2_balcony_ambient_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_2_sofa_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_2_coffee_table_lighting
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f2_livingroom_2_tv_downlight
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
            columns: 2
          - type: custom:bubble-card
            card_type: separator
            name: 其他
          - type: custom:bubble-card
            card_type: button
            button_type: slider
            entity: fan.211106241022386_fan
            sub_button:
              - entity: fan.211106241022386_fan
                icon: mdi:power
                tap_action:
                  action: toggle
            card_layout: normal
            show_icon: true
            scrolling_effect: true
            show_state: true
            show_last_changed: true
            show_attribute: true
            attribute: percentage
            force_icon: false
            show_name: true
          - type: custom:bubble-card
            card_type: media-player
            entity: media_player.sony_xr_75x95el_2
            show_last_changed: true
            show_state: true
            show_attribute: false
            attribute: supported_features
            card_layout: normal
            name: 电视
          - type: custom:bubble-card
            card_type: media-player
            entity: media_player.ht_z9f
            show_attribute: false
            attribute: device_class
            show_last_changed: false
            show_state: true
            hide:
              play_pause_button: false
            card_layout: normal
          - type: custom:bubble-card
            card_type: cover
            entity: cover.dooya_f2_livingroom_balcony_cover
            name: 阳台
            icon_open: mdi:curtains
            force_icon: false
            show_state: true
            show_last_changed: true
            show_attribute: true
            attribute: current_position
            card_layout: large
      - type: vertical-stack
        cards:
          - type: custom:bubble-card
            card_type: pop-up
            button_type: state
            entity: climate.gr_acunit_6400_02_b5c9
            hash: "#f3-livingroom"
            name: F3 客厅
            icon: mdi:sofa
            show_last_changed: false
            show_state: false
            tap_action:
              action: none
            card_layout: normal
            show_attribute: true
            attribute: current_temperature
          - type: custom:bubble-card
            card_type: separator
            name: 情景模式
            icon: mdi:card-outline
          - type: horizontal-stack
            cards:
              - type: custom:bubble-card
                card_type: button
                entity: switch.f3_ke_ting_ming_liang_mo_shi_stateful_scene
                name: 明亮
                card_layout: large
                show_icon: true
                icon: mdi:lightbulb-group
              - type: custom:bubble-card
                card_type: button
                entity: switch.f3_ke_ting_xiu_xian_mo_shi_stateful_scene
                card_layout: large
                name: 休闲
                icon: mdi:sofa
              - type: custom:bubble-card
                card_type: button
                entity: switch.f3_ke_ting_guan_ying_mo_shi_stateful_scene
                name: 观影
                card_layout: large
                show_icon: true
                icon: mdi:youtube-tv
          - type: custom:bubble-card
            card_type: separator
            name: 灯光
            icon: mdi:lightbulb-group
            sub_button:
              - entity: light.f3_livingroom_lights_fully_on_off
                show_icon: true
                show_background: true
                tap_action:
                  action: toggle
          - square: false
            type: grid
            cards:
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_1_left_light_strip
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_1_right_light_strip
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_1_left_downlight
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_1_grile_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_2_balcony_ambient_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_2_sofa_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_2_coffee_table_lighting
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_livingroom_2_tv_downlight
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
            columns: 2
          - type: custom:bubble-card
            card_type: separator
            name: 其他
          - type: custom:bubble-card
            card_type: cover
            entity: cover.dooya_f3_livingroom_balcony_cover
            name: 阳台
            icon_open: mdi:curtains
            force_icon: false
            show_state: true
            show_last_changed: true
            show_attribute: true
            attribute: current_position
            card_layout: large
          - type: custom:bubble-card
            card_type: cover
            entity: cover.dooya_f3_livingroom_1_cover
            name: 侧窗1
            icon_open: mdi:curtains
            force_icon: false
            show_state: true
            show_last_changed: true
            show_attribute: true
            attribute: current_position
            card_layout: large
          - type: custom:bubble-card
            card_type: cover
            entity: cover.dooya_f3_livingroom_2_cover
            name: 侧窗2
            icon_open: mdi:curtains
            force_icon: false
            show_state: true
            show_last_changed: true
            show_attribute: true
            attribute: current_position
            card_layout: large
      - type: vertical-stack
        cards:
          - type: custom:bubble-card
            card_type: pop-up
            button_type: state
            entity: climate.f3_wei_fang_leng_qi
            hash: "#f3-back-bedroom"
            name: F3 尾房
            icon: mdi:bed
            show_last_changed: false
            show_state: false
            tap_action:
              action: none
            card_layout: normal
            show_attribute: true
            attribute: current_temperature
          - type: custom:bubble-card
            card_type: separator
            name: 情景模式
            icon: mdi:card-outline
          - type: horizontal-stack
            cards:
              - type: custom:bubble-card
                card_type: button
                entity: switch.f3_wei_fang_ming_liang_mo_shi_stateful_scene
                name: 明亮
                card_layout: large
                show_icon: true
                icon: mdi:lightbulb-group
              - type: custom:bubble-card
                card_type: button
                entity: switch.f3_wei_fang_wen_xin_mo_shi_stateful_scene
                card_layout: large
                name: 温馨
                icon: mdi:bed
              - type: custom:bubble-card
                card_type: button
                entity: switch.f3_wei_fang_gong_zuo_mo_shi_stateful_scene
                name: 工作
                card_layout: large
                show_icon: true
                icon: mdi:desk
          - type: custom:bubble-card
            card_type: separator
            name: 灯光
            icon: mdi:lightbulb-group
            sub_button:
              - entity: light.f3_back_bedroom_lights_fully_on_off
                show_icon: true
                show_background: true
                tap_action:
                  action: toggle
                icon: mdi:power
          - square: false
            type: grid
            cards:
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_back_bedroom_2_light_strip
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_back_bedroom_2_bedside_spotlight
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_back_bedroom_2_desk_spotlight
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.smart_switch_f3_back_bedroom_2_wardrobe_spotlight
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
              - type: custom:bubble-card
                card_type: button
                entity: light.f3_back_bedroom_sensor_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
                name: 筒灯
              - type: custom:bubble-card
                card_type: button
                entity: light.f3_back_bathroom_light_light
                force_icon: false
                show_state: false
                show_last_changed: true
                show_attribute: false
                name: 厕所灯
            columns: 2
          - type: custom:bubble-card
            card_type: separator
            name: 其他
          - type: custom:bubble-card
            card_type: cover
            entity: cover.dooya_f3_bedroom_1_cover
            name: 侧窗
            icon_open: mdi:curtains
            force_icon: false
            show_state: true
            show_last_changed: true
            show_attribute: true
            attribute: current_position
            card_layout: large
          - type: custom:bubble-card
            card_type: cover
            entity: cover.dooya_f3_bedroom_2_cover
            name: 后窗
            icon_open: mdi:curtains
            force_icon: false
            show_state: true
            show_last_changed: true
            show_attribute: true
            attribute: current_position
            card_layout: large
      - type: vertical-stack
        cards:
          - type: custom:bubble-card
            card_type: pop-up
            hash: "#energy"
            button_type: name
            name: 能源
            icon: mdi:home-lightning-bolt-outline
            width_desktop: 540px
          - type: horizontal-stack
            title: 电网
            cards:
              - graph: none
                type: sensor
                entity: sensor.0319007100403036_this_month_total_usage
                icon: mdi:home-lightning-bolt-outline
                detail: 1
                name: 本月用电
              - hours_to_show: 24
                graph: none
                type: sensor
                entity: sensor.0319007100403036_latest_day_kwh
                name: 昨天用电
                icon: mdi:home-lightning-bolt-outline
                detail: 1
              - hours_to_show: 24
                graph: none
                type: sensor
                entity: sensor.0319007100403036_arrears
                detail: 1
                icon: mdi:currency-jpy
                unit: 元
                name: 应交电费
          - type: horizontal-stack
            cards:
              - type: sensor
                entity: sensor.0319007100403036_last_month_total_usage
                name: 上月用电
                icon: mdi:home-lightning-bolt-outline
              - hours_to_show: 24
                graph: none
                type: sensor
                entity: sensor.airpowerheatertemperature
                name: 上月电费
                detail: 1
                icon: mdi:currency-jpy
                unit: 元
          - type: horizontal-stack
            cards:
              - type: sensor
                entity: sensor.0319007100403036_this_year_total_usage
                name: 本年用电
                icon: mdi:home-lightning-bolt-outline
              - hours_to_show: 24
                graph: none
                type: sensor
                entity: sensor.0319007100403036_this_year_total_cost
                name: 本年电费
                detail: 1
                icon: mdi:currency-jpy
                unit: 元
          - type: horizontal-stack
            cards:
              - type: sensor
                entity: sensor.0319007100403036_last_year_total_usage
                icon: mdi:home-lightning-bolt-outline
                name: 上年用电
              - hours_to_show: 24
                graph: none
                type: sensor
                entity: sensor.0319007100403036_last_year_total_cost
                name: 上年电费
                detail: 1
                icon: mdi:currency-jpy
                unit: 元
          - type: horizontal-stack
            cards:
              - type: custom:apexcharts-card
                header:
                  show: true
                  title: 30天用电与费用趋势图
                graph_span: 30d
                span:
                  start: day
                  offset: "-30d"
                series:
                  - entity: sensor.history_day
                    type: column
                    name: 用电功率
                    color: rgb(51,153,255)
                    attribute: history_day_value
                    data_generator: |
                      return entity.attributes.history_day_value.map(entry => {
                        return {
                          x: entry.date,
                          y: entry.kwh
                        };
                      });
                  - entity: sensor.history_day
                    name: 用电费用
                    color: rgb(255,153,0)
                    attribute: history_day_value
                    data_generator: |
                      return entity.attributes.history_day_value.map(entry => {
                        return {
                          x: entry.date,
                          y: entry.kwh*0.65886875
                        };
                      });
          - type: entities
            entities:
              - entity: sensor.solar_system_module_battery_capacity
                name: 电池电量
              - entity: sensor.solar_system_module_battery_voltage
                name: Battery Voltage
              - entity: sensor.solar_system_module_charging_stage_2
                name: Charging Stage
              - entity: sensor.solar_system_module_controller_external_temperature
                name: Controller external temperature
              - entity: sensor.solar_system_module_controller_radiator_temperature
                name: Controller radiator temperature
              - entity: binary_sensor.solar_system_module_cooling_fan
                name: Cooling fan
              - entity: sensor.solar_system_module_pv_charging_current
                name: PV charging current
              - entity: sensor.solar_system_module_pv_power
                name: PV Power
              - entity: sensor.solar_system_module_pv_voltage
                name: PV Voltage
              - entity: sensor.solar_system_module_inverter_output_load_percent
                name: 负载百分比
              - entity: sensor.solar_system_module_inverter_output_approximate_power
                name: 大概输出功率
            title: 光伏
  - type: grid
    cards: []
cards: []

Informations (please complete the following information):

Additional context
Add any other context about the problem here.

Thank you! 🍻

Clooos commented 3 months ago

Hi and indeed! But I've already fixed it on my side, it was a big one 😅 This issue was in the sub-buttons and you have a lot of them.

I will release a new version in beta really soon!

Clooos commented 3 months ago

This issue is now fixed in the new beta!

https://github.com/Clooos/Bubble-Card/releases/tag/v2.1.0-beta.1

tm24fan8 commented 2 months ago

I still have a memory leak after updating to 2.1.0 that pretty much exactly fits the description here. Edit mode makes things almost unusable. I do use a fair amount of sub-buttons and popups.

If you need any other particular information, don't hesitate to ask.

tm24fan8 commented 2 months ago

You can disregard. I have found it was an issue with the Bitwarden extension in my browser not playing nice with Home Assistant.

Issue here: https://github.com/bitwarden/clients/issues/9617

So I apologize for any confusion, as it was not an issue with your card :)

Clooos commented 2 months ago

Thank you for the feedback!