thomasloven / hass-browser_mod

🔹 A Home Assistant integration to turn your browser into a controllable entity and media player
MIT License
1.35k stars 186 forks source link

horizontal-stack seems to have quit in latest versions #585

Closed SdeGeata closed 1 year ago

SdeGeata commented 1 year ago

My Home Assistant version:

Home Assistant 2023.5.4 Supervisor 2023.04.1 Operating System 10.1 Frontend 20230503.3 - latest

What I am doing: I upgraded Home Assistant and Browser Mod to latest versions.

What I expected to happen: / What happened instead: Since then Pop-up windows no longer display anything nested in Horizontal-Stacks. All other card content displays though.

The same YAML copied as a new card rather than a pop-up with display fine in the dashboard, all content is shown. So this seems to be associated to the integration.

What the pop-up should look like: Screen Shot 2023-04-12 at 5 26 42 PM

And what it looks like now: Screen Shot 2023-05-28 at 12 48 44 PM

Minimal steps to reproduce:

    tap_action:
      action: fire-dom-event
      browser_mod:
        service: browser_mod.popup
        data:
          title: Magick Mirror
          card_mod:
            style:
              $: |
                .mdc-dialog .mdc-dialog__container {
                  width: 1%;
                }
                .mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
                  width: 1%;
                  box-shadow:none;
                }
              .: |
                :host {
                  --mdc-theme-surface: rgba(0,0,0,0.7);
                  --secondary-background-color: rgba(0,0,0,0.7);
                  --ha-card-background: rgba(0,0,0,0.7);
                  --mdc-dialog-scrim-color: rgba(0,0,0,0.4);
                  --mdc-dialog-min-height: 20%;
                  --mdc-dialog-min-width: 5%;
                  --mdc-dialog-max-width: 10%;

                }
          content:
            type: vertical-stack
            cards:
              - type: horizontal-stack
                cards:
                  - show_name: true
                    show_icon: true
                    type: button
                    tap_action:
                      action: toggle
                    entity: switch.pub_sign
                    icon: mdi:glass-mug-variant
                    name: Pub Sign
                  - show_name: true
                    show_icon: true
                    type: button
                    tap_action:
                      action: toggle
                    entity: switch.mirror_mirror
                    name: Magick Mirror
                    icon: mdi:drama-masks
              - type: vertical-stack
                cards:
                  - type: gauge
                    needle: true
                    entity: sensor.mirror_brightness_sensor
                  - type: entities
                    entities:
                      - entity: switch.mm_brightness_toggle
                        type: custom:multiple-entity-row
                        name: Brightness
                        icon: mdi:brightness-6
                        column: false
                        state_color: true
                        show_state: false
                        tap_action:
                          action: toggle
                        hold_action:
                          action: more-info
                        entities:
                          - entity: switch.motion_detect_toggle
                            name: Detection
                            icon: true
                            type: button
                            tap_action:
                              action: toggle
                            state_color: true
                          - entity: switch.mm_rtsp_stream
                            name: RTSP
                            icon: mdi:cctv
                            type: button
                            tap_action:
                              action: toggle
                            state_color: true
                          - entity: sensor.12hr_time
                            name: Current Time
                          - entity: sensor.detection_enable_time
                            name: Enabled
                            format: time
                          - entity: sensor.lr_motion_detect_off
                            name: Disabled
                            format: time
                  - type: vertical-stack
                    cards:
                      - square: true
                        type: grid
                        cards:
                          - show_name: true
                            show_icon: true
                            type: button
                            tap_action:
                              action: toggle
                            entity: switch.start_stop_mm_via_ssh
                            icon: mdi:power-standby
                            show_state: false
                            name: PM2 Start/Stop M-Mirror
                          - show_name: true
                            show_icon: true
                            type: button
                            tap_action:
                              action: toggle
                            icon: mdi:update
                            name: Hide Mirror Updates
                            entity: switch.hide_mirror_updates
                            show_state: false
                          - show_name: true
                            show_icon: true
                            type: button
                            tap_action:
                              action: toggle
                            name: Save Remote Settings
                            icon: mdi:content-save
                            show_state: false
                            entity: switch.momentary_save_remote_settings
                          - show_name: true
                            show_icon: true
                            type: button
                            tap_action:
                              action: toggle
                            name: Refresh Magick Mirror
                            icon: mdi:image-refresh
                            entity: switch.momentary_refresh_mirror
                          - show_name: true
                            show_icon: true
                            type: button
                            tap_action:
                              action: toggle
                            show_state: false
                            entity: switch.momentary_restart_mirror
                            name: Restart Mirror
                            icon: mdi:restart
                          - show_name: true
                            show_icon: true
                            type: button
                            tap_action:
                              action: toggle
                              confirmation:
                                text: Confirmation; Reboot the Mirror?
                            name: Reboot Pi
                            icon: mdi:restart-alert
                            entity: switch.momentary_reboot_mirror_pi
                        columns: 3
                      - type: iframe
                        url: http://192.168.1.200:8080/remote.html
                        aspect_ratio: 100%

Error messages from the browser console:

No errors to report.

// Select everything from the browser console and copy it

// Paste it here

By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

SdeGeata commented 1 year ago

I just did some more testing, it appears to be unrelated to horizontal-stacks, but rather the card type of button-card. It renders fine as an entity. Closing the issue.