找回密码
 立即注册
查看: 181|回复: 0

[求助] [已解决]谁知道这个卡片为啥每次都要报错一下然后就好了?

[复制链接]
25 金钱 回复本帖可获得 5 金钱奖励! 每人限 1 次

63

主题

108

回帖

623

积分

高级会员

积分
623
金钱
452
HASS币
0
发表于 2025-3-15 11:27:09 | 显示全部楼层 |阅读模式
本帖最后由 cookiesliy 于 2025-4-3 22:52 编辑

代码平时没问题,就是刚打开的时候偶尔会跳出那个错误,一会儿就恢复正常了.

photo_2025-03-15_11-23-25.jpg photo_2025-03-15_11-23-33.jpg ------------------------------------------------------------------

type: custom:stack-in-card
title: 机柜
cards:
  - type: horizontal-stack
    cards:
      - type: custom:flex-horseshoe-card
        styles:
          card:
            - "--keep-background": "false"
        entities:
          - entity: sensor.tuya_temperature_temperature
            attribute: temperature
            decimals: 1
            name: 机柜温湿度
            unit: °C
          - entity: sensor.tuya_temperature_humidity
            attribute: humidity
            decimals: 0
            unit: "%"
            icon: mdi:water-percent
          - entity: sensor.tuya_temperature_battery
            attribute: battery
            decimals: 0
            unit: "%"
            icon: mdi:battery
        show:
          horseshoe_style: lineargradient
        layout:
          hlines:
            - id: 0
              xpos: 50
              ypos: 42
              length: 50
              styles:
                - stroke: var(--primary-text-color);
                - stroke-width: 5;
                - stroke-linecap: round;
                - opacity: 0.7;
          states:
            - id: 0
              entity_index: 0
              xpos: 50
              ypos: 34
              styles:
                - font-size: 3em;
            - id: 1
              entity_index: 1
              xpos: 40
              ypos: 57
              styles:
                - text-anchor: start;
                - font-size: 1.5em;
            - id: 2
              entity_index: 2
              xpos: 40
              ypos: 72
              styles:
                - text-anchor: start;
                - font-size: 1.5em;
          icons:
            - id: 0
              entity_index: 1
              xpos: 37
              ypos: 57
              align: end
              size: 1.3
            - id: 1
              entity_index: 2
              xpos: 37
              ypos: 72
              align: end
              size: 1.3
          names:
            - id: 0
              entity_index: 0
              xpos: 50
              ypos: 95
              styles:
                - font-size: 1.5 em;
        horseshoe_scale:
          min: -10
          max: 40
        color_stops:
          "16": "#F2FBEF"
          "17": "#DFF4D6"
          "18": "#CAEDBB"
          "19": "#B4E69F"
          "20": "#A4E08B"
          "21": "#94DB76"
          "22": "#8CD76E"
          "23": "#81D263"
          "24": "#77CD59"
          "25": "#65C446"







回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-5-1 06:59 , Processed in 0.063660 second(s), 27 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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