找回密码
 立即注册

微信扫码登录

搜索
查看: 503|回复: 1

[技术探讨] apexcharts-card疑难杂症

[复制链接]

13

主题

69

回帖

451

积分

中级会员

积分
451
金钱
369
HASS币
0
发表于 2025-5-16 09:45:41 | 显示全部楼层 |阅读模式
type: custom:apexcharts-card
stacked: true
graph_span: 30d
span:
  start: day
  offset: "-30d"
show:
  last_updated: true
header:
  show: true
  show_states: true
  colorize_states: true
  title: 30天电量
yaxis:
  - id: first
    decimals: 0
    apex_config:
      tickAmount: 5
    min: 0
    max: 25
series:
  - entity: sensor.history_day
    type: column
    name: 用电功率
    color: rgb(51,153,255)
    attribute: history_day_value
    data_generator: |
      return entity.attributes.history_day_value.map(entry => {
        return {
          x: entry.date,
          y: entry.kwh
        };
      });

  - entity: sensor.shantou_temperature
    name: 最高气温
    type: line
    stroke_width: 2
    color: orange
    yaxis_id: first
    group_by:
      func: max
      duration: 1d

                               
登录/注册后可看大图


这个apexcharts-card加了个温度曲线,就显示不了了,百思不得其解
回复

使用道具 举报

7

主题

99

回帖

898

积分

高级会员

积分
898
金钱
792
HASS币
0
发表于 2025-6-3 11:28:42 | 显示全部楼层
建议按照Github上的官方例子改entity信息即可
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-8-16 17:14 , Processed in 0.050337 second(s), 8 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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