『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
123
返回列表 发新帖
楼主: xiaowutongzhi

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

[复制链接]

1

主题

24

帖子

179

积分

注册会员

Rank: 2

积分
179
金钱
155
HASS币
0
 楼主| 发表于 3 天前 | 显示全部楼层
玩AI的辣条哥 发表于 2025-2-14 10:29
漂亮,请教用什么做的?

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

使用道具 举报

1

主题

24

帖子

179

积分

注册会员

Rank: 2

积分
179
金钱
155
HASS币
0
 楼主| 发表于 3 天前 | 显示全部楼层
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

帖子

2675

积分

金牌会员

Rank: 6Rank: 6

积分
2675
金钱
2651
HASS币
0
发表于 3 天前 | 显示全部楼层
这个是怎么实现的。把户型图和其他的卡片弄到一起的。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-2-22 14:11 , Processed in 0.053142 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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