Files
my-vault/01_Projects/Home-Automation/CSG/Config.md
T
windyboy b182762e14 refactor(vault): Phase 3 — metadata convergence
- Backfill `created` frontmatter on 266 active notes (git date or mtime)
- Normalize `status` to 4 values: draft/active/done/archived (11 notes)
  - Active/进行中/needs-review → active
  - archive → archived
  - 待执行/conditional → draft
  - 完成/accepted → done
- Declare clipper boundary: 04_Archive/Inbox-Clippings/** exempt from migration
- Update depth rule: max 3 → max 4 levels (new notes only)
- Add metadata-converge.mjs script for reproducibility
2026-09-26 11:37:19 +08:00

6.2 KiB

created
created
2026-01-05

type: vertical-stack
cards:
  - type: horizontal-stack
    title: 用电状态
    cards:
      - type: sensor
        entity: sensor.0800041935246530_this_month_total_usage
        name: 本月用电
        icon: mdi:home-lightning-bolt-outline
      - hours_to_show: 24
        graph: none
        type: sensor
        entity: sensor.0800041935246530_latest_day_kwh
        name: 昨天用电
        icon: mdi:home-lightning-bolt-outline
        detail: 1
      - hours_to_show: 24
        graph: none
        type: sensor
        entity: sensor.0800041935246530_arrears
        detail: 1
        icon: mdi:currency-jpy
        unit: 元
        name: 应交电费
  - type: horizontal-stack
    cards:
      - type: sensor
        entity: sensor.0800041935246530_last_month_total_usage
        name: 上月用电
        icon: mdi:home-lightning-bolt-outline
      - hours_to_show: 24
        graph: none
        type: sensor
        entity: sensor.airpowerheatertemperature
        name: 上月电费
        detail: 1
        icon: mdi:currency-jpy
        unit: 元
  - type: horizontal-stack
    cards:
      - type: sensor
        entity: sensor.0800041935246530_this_year_total_usage
        name: 本年用电
        icon: mdi:home-lightning-bolt-outline
      - hours_to_show: 24
        graph: none
        type: sensor
        entity: sensor.0800041935246530_this_year_total_cost
        name: 本年电费
        detail: 1
        icon: mdi:currency-jpy
        unit: 元
  - type: horizontal-stack
    cards:
      - type: sensor
        entity: sensor.0800041935246530_last_year_total_usage
        icon: mdi:home-lightning-bolt-outline
        name: 上年用电
      - hours_to_show: 24
        graph: none
        type: sensor
        entity: sensor.0800041935246530_last_year_total_cost
        name: 上年电费
        detail: 1
        icon: mdi:currency-jpy
        unit: 元
  - type: horizontal-stack
    cards:
      - type: custom:apexcharts-card
        header:
          show: true
          title: 30天用电与费用趋势图
        graph_span: 30d
        span:
          start: day
          offset: '-30d'
        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.history_day
            name: 用电费用
            color: rgb(255,153,0)
            attribute: history_day_value
            data_generator: |
              return entity.attributes.history_day_value.map(entry => {
                return {
                  x: entry.date,
                  y: entry.kwh*0.65886875
                };
              });
type: grid
cards:
  - type: vertical-stack
    cards:
      - type: horizontal-stack
        title: 用电状态
        cards:
          - graph: none
            type: sensor
            entity: sensor.0800041935246530_this_month_total_usage
            name: 本月用电
            icon: mdi:home-lightning-bolt-outline
            hours_to_show: 24
            detail: 1
          - type: sensor
            entity: sensor.0800041935246530_latest_day_kwh
            name: 昨天用电
            icon: mdi:home-lightning-bolt-outline
            detail: 1
            hours_to_show: 24
            graph: none
          - type: sensor
            entity: sensor.0800041935246530_arrears
            detail: 1
            icon: mdi:currency-jpy
            unit: 元
            name: 应交电费
    grid_options:
      columns: 12
      rows: 4
  - type: horizontal-stack
    cards:
      - type: sensor
        entity: sensor.0800041935246530_last_month_total_usage
        name: 上月用电
        icon: mdi:home-lightning-bolt-outline
        hours_to_show: 24
        graph: none
      - type: sensor
        entity: sensor.airpowerheatertemperature
        name: 上月电费
        detail: 1
        icon: mdi:currency-jpy
        unit: 元
    grid_options:
      columns: 12
      rows: 2
  - type: horizontal-stack
    cards:
      - type: sensor
        entity: sensor.0800041935246530_this_year_total_usage
        name: 本年用电
        icon: mdi:home-lightning-bolt-outline
        hours_to_show: 24
        graph: none
      - type: sensor
        entity: sensor.0800041935246530_this_year_total_cost
        name: 本年电费
        detail: 1
        icon: mdi:currency-jpy
        unit: 元
    grid_options:
      columns: 12
      rows: 2
  - type: horizontal-stack
    cards:
      - type: sensor
        entity: sensor.0800041935246530_last_year_total_usage
        icon: mdi:home-lightning-bolt-outline
        name: 上年用电
        hours_to_show: 24
        graph: none
      - type: sensor
        entity: sensor.0800041935246530_last_year_total_cost
        name: 上年电费
        detail: 1
        icon: mdi:currency-jpy
        unit: 元
    grid_options:
      columns: 12
      rows: 2
  - type: horizontal-stack
    cards:
      - type: custom:apexcharts-card
        header:
          show: true
          title: 30天用电与费用趋势图
        graph_span: 30d
        span:
          start: day
          offset: "-30d"
        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.history_day
            name: 用电费用
            color: rgb(255,153,0)
            attribute: history_day_value
            data_generator: |
              return entity.attributes.history_day_value.map(entry => {
                return {
                  x: entry.date,
                  y: entry.kwh*0.65886875
                };
              });
    grid_options:
      columns: 12
      rows: 5
column_span: 1