找回密码
 立即注册

微信扫码登录

搜索
查看: 150|回复: 9

[UI界面] 气泡卡片弹出调用失败

[复制链接]

1

主题

94

回帖

550

积分

高级会员

积分
550
金钱
455
HASS币
0
发表于 昨天 08:57 | 显示全部楼层 |阅读模式

这个代码:
- title: 空调
    type: image
    style:
      left: 6%
      top: 82%
      width: 14%
    entity: climate.gree_climate
    state_image:
      'off': /local/icos/空调/空调关.png
      heat: /local/icos/空调/空调热.gif
      cool: /local/icos/空调/空调冷.gif
      fan_only: /local/icos/空调/空调无AC.gif
      dry: /local/icos/空调/空调冷.gif
    tap_action:
      action: navigate
      navigation_path: !include "气泡卡片/空调.yaml"


弹出下边这个代码


空调yaml内容空调代码    type: vertical-stack
    cards:
      - type: custom:bubble-card
        card_type: pop-up
        hash: "#kong_tiao"
        show_header: true
        width_desktop: 540px
        margin_top_mobile: calc(100vh - 90vh)
        margin_top_desktop: calc(100vh - 90vh)
        bg_opacity: "70"
        bg_blur: "2"
        tap_action:
          action: none
        double_tap_action:
          action: none
        hold_action:
          action: none
        button_action:
          tap_action:
            action: none
          double_tap_action:
            action: none
          hold_action:
            action: none
        button_type: name
      - type: custom:button-card
        name: 空调
        show_name: true
        show_label: false
        show_icon: false
        styles:
          card:
            - height: auto
            - padding: 0 12px 0 0
            - background: none
            - box-shadow: none
            - border: none
          name:
            - font-size: 26px
            - font-weight: bold
            - text-align: left
            - justify-content: flex-start
            - margin: 0
      - type: vertical-stack
        cards:
          - type: custom:simple-thermostat
            entity: climate.gree_climate
            step_size: 1
            label:
              state: 状态
              temperature: 温度
              humidity: 湿度
            layout:
              mode:
                headings: false
                icons: true
              step: row
            header:
              toggle:
                entity: switch.2_panel_light
                name: 面板灯
              faults:
                entity: switch.2_panel_light
            control:
              hvac:
                "off":
                  name: 关闭
                heat:
                  name: 制热
                cool:
                  name: 制冷
                auto:
                  name: 自动
                dry:
                  name: 除湿
                fan_only:
                  name: 送风
                heat_cool:
                  name: 自动调温
              fan:
                auto:
                  name: 自动
                low:
                  name: 低速
                medium_low:
                  name: 中低速
                medium:
                  name: 中速
                medium_high:
                  name: 中高速
                high:
                  name: 高速
                turbo:
                  name: 超强
                quiet:
                  name: 静音
              swing:
                default:
                  name: 默认
                swing_full:
                  name: 全摆动
                fixed_upmost:
                  name: 固定最上
                fixed_middle_up:
                  name: 固定中上
                fixed_middle:
                  name: 固定中间
                fixed_middle_low:
                  name: 固定中下
                fixed_lowest:
                  name: 固定最下
                swing_downmost:
                  name: 摆动最下
                swing_middle_low:
                  name: 摆动中下
                swing_middle:
                  name: 摆动中间
                swing_middle_up:
                  name: 摆动中上
                swing_upmost:
                  name: 摆动最上
              swing_horizontal:
                default:
                  name: 默认
                swing_full:
                  name: 全摆动
                fixed_leftmost:
                  name: 固定最左
                fixed_middle_left:
                  name: 固定中左
                fixed_middle:
                  name: 固定中间
                fixed_middle_right:
                  name: 固定中右
                fixed_rightmost:
                  name: 固定最右
            card_mod:
              style: |
                :host {
                  --st-font-size-title: 20px;
                }


tap_action:
      action: navigate
      navigation_path: !include "气泡卡片/空调.yaml"或"气泡卡片/空调.yanl#kong_tiao"   都没效果,麻烦大佬指点
回复

使用道具 举报

26

主题

190

回帖

1586

积分

论坛UI达人

积分
1586
金钱
1365
HASS币
50
发表于 昨天 11:46 | 显示全部楼层
不能外部引用的吧,拉起的pop-up卡必须得在同一视图下
tap_action:
    action: navigate
    navigation_path: "#pop-up-hash"
回复

使用道具 举报

1

主题

94

回帖

550

积分

高级会员

积分
550
金钱
455
HASS币
0
 楼主| 发表于 昨天 11:55 | 显示全部楼层
gasment 发表于 2025-8-14 11:46
不能外部引用的吧,拉起的pop-up卡必须得在同一视图下
tap_action:
    action: navigate

气泡卡片占位太严重,这样外部调用直接加载yaml文件达到不占位
回复

使用道具 举报

1

主题

94

回帖

550

积分

高级会员

积分
550
金钱
455
HASS币
0
 楼主| 发表于 昨天 12:00 | 显示全部楼层
gasment 发表于 2025-8-14 11:46
不能外部引用的吧,拉起的pop-up卡必须得在同一视图下
tap_action:
    action: navigate

不知占位你是怎么解决的,虽然隐藏看不见,但可以上滑出好多空白
回复

使用道具 举报

26

主题

190

回帖

1586

积分

论坛UI达人

积分
1586
金钱
1365
HASS币
50
发表于 昨天 15:07 | 显示全部楼层
wenbieba 发表于 2025-8-14 12:00
不知占位你是怎么解决的,虽然隐藏看不见,但可以上滑出好多空白

我没有空白的问题,同一个视图挤了十几个pop-up卡,能滑动的只有非隐藏那部分,pop-up单开一列,他要放到所有显式卡片后面
回复

使用道具 举报

1

主题

94

回帖

550

积分

高级会员

积分
550
金钱
455
HASS币
0
 楼主| 发表于 昨天 17:40 | 显示全部楼层
gasment 发表于 2025-8-14 15:07
我没有空白的问题,同一个视图挤了十几个pop-up卡,能滑动的只有非隐藏那部分,pop-up单开一列,他要放到 ...

气泡卡片都会出现占位现象,正常模式看不见,但占了空间,不知大佬是怎么操作的,我的操作,垂直卡片~气泡卡片。位置:UI最最最末端
回复

使用道具 举报

3

主题

95

回帖

923

积分

论坛技术达人

积分
923
金钱
820
HASS币
20
发表于 昨天 21:45 | 显示全部楼层
wenbieba 发表于 2025-8-14 17:40
气泡卡片都会出现占位现象,正常模式看不见,但占了空间,不知大佬是怎么操作的,我的操作,垂直卡片~气 ...

我也有遇到这个问题
回复

使用道具 举报

11

主题

254

回帖

2508

积分

金牌会员

积分
2508
金钱
2238
HASS币
20
发表于 昨天 23:50 | 显示全部楼层
本帖最后由 hungheo 于 2025-8-14 23:57 编辑

删除占位符

插件:card mod
在主题文件中添加:
hungheo:  #主题名称
  card-mod-theme: "hungheo" #主题名称一致
  card-mod-view-yaml: |
    hui-view>hui-sections-view$: |
      .container {
        gap: 0px var(--column-gap) !important;
      }
这里的gap:0px就是把间距变成0了,就没有占位了


修改前:
屏幕截图 2025-08-14 235509.png


修改后:
屏幕截图 2025-08-14 235619.png

回复

使用道具 举报

1

主题

94

回帖

550

积分

高级会员

积分
550
金钱
455
HASS币
0
 楼主| 发表于 1 小时前 | 显示全部楼层
hungheo 发表于 2025-8-14 23:50
删除占位符

插件:card mod

不知什么原因放入不没反应,插件也是存在的
hungheo:  #主题名称
  card-mod-theme: "hungheo" #主题名称一致
  card-mod-view-yaml: |
    hui-view>hui-sections-view$: |
      .container {
        gap: 0px var(--column-gap) !important;
      }

  h-white: 255,255,255
  h-black: 0,0,0
  h-light-black: 59,59,59
  h-light-black-2: 65,65,65
  h-grey: 189,189,189
  h-light-green: 140,198,63
  h-rgb-white: rgb(var(--h-white))
  h-rgb-light-black: rgb(var(--h-light-black))

  
#main
  primary-color: "#8CC63F"
  accent-color: "var(--primary-color)"
  primary-background-color: "#3b3b3b"
  primary-text-color: rgb(var(--h-white))
  secondary-text-color: "#bdbdbd"

回复

使用道具 举报

11

主题

254

回帖

2508

积分

金牌会员

积分
2508
金钱
2238
HASS币
20
发表于 1 分钟前 | 显示全部楼层
wenbieba 发表于 2025-8-15 08:24
不知什么原因放入不没反应,插件也是存在的
hungheo:  #主题名称
  card-mod-theme: "hungheo" #主题名称 ...

重载一下主题
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-8-15 10:13 , Processed in 0.098086 second(s), 6 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表