Skip to content

Value template shows sometimes wrong values #1007

@boarder876

Description

@boarder876

Because the sensor values of xiomi integration are given in seconds, I've used the value_template to show the sensor values in hours.

Sometimes all of the sensors are showing the right values, sometimes not. i need to reload the dashboard, then the values are updated.

Here's the config. The screenshot shows that the filter remains 66039h, but it's 66039sec=18,3h.

card:
  type: custom:vacuum-card
  style: |
    ha-card {
      --vc-background: #17A8F4;
      --vc-spacing: 50px;
    }
  entity: vacuum.xiaomi_vacuum_cleaner
  compact_view: true
  stats:
    default:
      - entity_id: sensor.xiaomi_vacuum_cleaner_filter_left
        value_template: "{{ (value | float(0) / 3600) | round(1) }}"
        unit: h
        subtitle: Filter
      - entity_id: sensor.xiaomi_vacuum_cleaner_side_brush_left
        value_template: "{{ (value | float(0) / 3600) | round(1) }}"
        unit: h
        subtitle: Side brush
      - entity_id: sensor.xiaomi_vacuum_cleaner_main_brush_left
        value_template: "{{ (value | float(0) / 3600) | round(1) }}"
        unit: h
        subtitle: Main brush
      - entity_id: sensor.xiaomi_vacuum_cleaner_sensor_dirty_left
        value_template: "{{ (value | float(0) / 3600) | round(1) }}"
        unit: h
        subtitle: Sensors
Image Image

I'm on the latest HA version: 2025.10.4
vacuum card is also the latest v2.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions