找回密码
 立即注册
楼主: xiaowutongzhi

[UI界面] 给公司做了一套UI,包含IPAD和手机端

[复制链接]

1

主题

28

回帖

210

积分

中级会员

积分
210
金钱
181
HASS币
0
 楼主| 发表于 2025-2-19 08:54:48 | 显示全部楼层
玩AI的辣条哥 发表于 2025-2-14 10:29
漂亮,请教用什么做的?

酷家乐  b站有视频可以学习 然后自己再改
回复

使用道具 举报

1

主题

28

回帖

210

积分

中级会员

积分
210
金钱
181
HASS币
0
 楼主| 发表于 2025-2-19 08:55:50 | 显示全部楼层
a_dongde 发表于 2025-2-14 11:11
NAS  卡片代码能否分享下

type: custom:button-card
name: |
  [[[
    var icon = states['binary_sensor.10_10_10_5'].state === 'on' ? 'mdi:nas' : 'mdi:alert-circle-outline';
    var iconColor = states['binary_sensor.10_10_10_5'].state === 'on' ? 'blue' : 'red';
      return `<ha-icon icon="${icon}" style="width: 30px; color: ${iconColor};"></ha-icon> Synology NAS`;
  ]]]
show_icon: true
show_state: true
show_name: true
styles:
  grid:
    - grid-template-areas: '"n n n" "a b g" "c d g" "e f g" '
    - grid-template-columns: 1fr 1fr 1.5fr
    - grid-template-rows: auto 1fr 1fr 1fr
  name:
    - font-weight: bold
    - font-size: 20px
    - align-self: start
    - justify-self: start
    - margin: 6%
  card:
    - padding: 6px
custom_fields:
  a:
    card:
      type: custom:button-card
      entity: sensor.synologynas_cpu_utilization_total
      name: CPU利用率
      show_icon: false
      show_name: true
      show_state: true
      show_label: true
      styles:
        grid:
          - grid-template-areas: '"s" "n"'
        card:
          - background: none
          - border: none
          - box-shadow: none
          - margin-left: 10%
          - border-radius: 0px  !important
        name:
          - align-self: start
          - justify-self: start
          - font-size: 10px
        state:
          - align-self: start
          - justify-self: start
          - font-weight: bold
          - font-size: 15px
  b:
    card:
      type: custom:button-card
      entity: sensor.synologynas_memory_usage_real
      name: RAM利用率
      show_icon: false
      show_name: true
      show_state: true
      styles:
        grid:
          - grid-template-areas: '"s" "n"'
        card:
          - background: none
          - border: none
          - box-shadow: none
          - border-radius: 0px  !important
        name:
          - align-self: start
          - justify-self: start
          - font-size: 10px
        state:
          - align-self: start
          - justify-self: start
          - font-weight: bold
          - font-size: 15px
  c:
    card:
      type: custom:button-card
      entity: sensor.synologynas_upload_throughput
      name: 上传吞吐量
      show_icon: false
      show_name: true
      show_state: true
      show_label: false
      styles:
        grid:
          - grid-template-areas: '"s" "n"'
        card:
          - background: none
          - border: none
          - box-shadow: none
          - margin-left: 10%
          - border-radius: 0px  !important
        name:
          - align-self: start
          - justify-self: start
          - font-size: 10px
        state:
          - align-self: start
          - justify-self: start
          - font-weight: bold
          - font-size: 15px
  d:
    card:
      type: custom:button-card
      entity: sensor.synologynas_download_throughput
      name: 下载吞吐量
      show_icon: false
      show_name: true
      show_state: true
      show_label: true
      styles:
        grid:
          - grid-template-areas: '"s" "n"'
        card:
          - background: none
          - border: none
          - box-shadow: none
          - border-radius: 0px  !important
        name:
          - align-self: start
          - justify-self: start
          - font-size: 10px
        state:
          - align-self: start
          - justify-self: start
          - font-weight: bold
          - font-size: 15px
  e:
    card:
      type: custom:button-card
      entity: sensor.synologynas_volume_1_volume_used
      name: Volume 1
      show_icon: false
      show_name: true
      show_state: true
      show_label: true
      styles:
        grid:
          - grid-template-areas: '"s" "n"'
        card:
          - background: none
          - border: none
          - box-shadow: none
          - margin-left: 10%
          - border-radius: 0px  !important
        name:
          - align-self: start
          - justify-self: start
          - font-size: 10px
        state:
          - align-self: start
          - justify-self: start
          - font-weight: bold
          - font-size: 15px
  f:
    card:
      type: custom:button-card
      entity: sensor.synologynas_volume_2_volume_used
      name: Volume 2
      show_icon: false
      show_name: true
      show_state: true
      show_label: true
      styles:
        grid:
          - grid-template-areas: '"s" "n"'
        card:
          - background: none
          - border: none
          - box-shadow: none
          - border-radius: 0px  !important
        name:
          - align-self: start
          - justify-self: start
          - font-size: 10px
        state:
          - align-self: start
          - justify-self: start
          - font-weight: bold
          - font-size: 15px
  g:
    card:
      type: custom:button-card
      name: 图片
      show_entity_picture: true
      entity_picture: /local/img/DS3622XS.png
      show_icon: false
      show_name: false
      show_state: false
      styles:
        card:
          - background: none
          - border: none
          - box-shadow: none
        entity_picture:
          - align-self: start
          - justify-self: start
          - width: 120px
          - padding: 0px
回复

使用道具 举报

2

主题

24

回帖

2776

积分

金牌会员

积分
2776
金钱
2750
HASS币
0
发表于 2025-2-19 09:49:00 | 显示全部楼层
这个是怎么实现的。把户型图和其他的卡片弄到一起的。
回复

使用道具 举报

1

主题

28

回帖

210

积分

中级会员

积分
210
金钱
181
HASS币
0
 楼主| 发表于 2025-2-24 09:00:34 | 显示全部楼层
zuobianfy 发表于 2025-2-19 09:49
这个是怎么实现的。把户型图和其他的卡片弄到一起的。

整个视图   用PS
回复

使用道具 举报

5

主题

34

回帖

329

积分

中级会员

积分
329
金钱
290
HASS币
0
发表于 2025-2-28 14:38:44 | 显示全部楼层
xiaowutongzhi 发表于 2025-2-19 08:55
type: custom:button-card
name: |
  [[[

['binary_sensor.10_10_10_5']请问这个是什么实体,我按这个卡片代码加上后,显示不出来信息和图片
回复

使用道具 举报

1

主题

28

回帖

210

积分

中级会员

积分
210
金钱
181
HASS币
0
 楼主| 发表于 2025-3-4 14:24:43 | 显示全部楼层
又更新了一下  情景模式换成弹框选择了  使用systemonier集成把树莓派的数据接了进来
回复

使用道具 举报

22

主题

648

回帖

3024

积分

论坛元老

积分
3024
金钱
2354
HASS币
0
发表于 2025-3-4 14:57:05 | 显示全部楼层
max_sh 发表于 2025-2-28 14:38
['binary_sensor.10_10_10_5']请问这个是什么实体,我按这个卡片代码加上后,显示不出来信息和图片 ...

图片见G行,,有图片配置
回复

使用道具 举报

1

主题

151

回帖

1751

积分

金牌会员

积分
1751
金钱
1599
HASS币
0
发表于 2025-3-6 20:34:12 | 显示全部楼层
分享下图标和代码
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-5-4 10:03 , Processed in 0.066343 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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