Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get stats to display #429

Open
26tajeen opened this issue Dec 21, 2024 · 1 comment
Open

Can't get stats to display #429

26tajeen opened this issue Dec 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@26tajeen
Copy link

Thanks for this card! Using the below config but can't get the stats for sensor.office_nanoprotect_filter and sensor.office_pre_filter to show or the aqi to overlay/appear

      - card:
        type: 'custom:purifier-card'
        entity: fan.office
        stats:
          - attribute: sensor.office_nanoprotect_filter
            subtitle: Filter Remaining
            unit: '%'
          - attribute: sensor.office_pre_filter
            subtitle: Pre Filter Remaining
            unit: '%'
        shortcuts:
          - name: Sleep
            icon: 'mdi:weather-night'
            preset_mode: sleep
          - name: Medium
            icon: 'mdi:circle-slice-4'
            preset_mode: medium
          - name: Turbo
            icon: 'mdi:circle-slice-8'
            preset_mode: turbo
          - name: Auto
            icon: 'mdi:brightness-auto'
            preset_mode: auto
        aqi: 
          - entity_id: sensor.office_pm2_5
            unit: µg/m3
        show_name: true
        show_state: true
        show_toolbar: true
        compact_view: false

Screenshot 2024-12-21 at 23 20 32
Screenshot 2024-12-21 at 23 20 13
Screenshot 2024-12-21 at 23 20 06

Am I doing something wrong?

@26tajeen 26tajeen added the bug Something isn't working label Dec 21, 2024
@shai66
Copy link

shai66 commented Jan 2, 2025

In case it helps - in stats instead of attribute you can use entity_id, just check for the corresponding entity id, it could look something like this:

 - card:
    type: 'custom:purifier-card'
    entity: fan.office
    stats:
      - entity_id: sensor.office_nanoprotect_filter
        subtitle: Filter Remaining
        unit: '%'
      - entity_id: sensor.office_pre_filter
        subtitle: Pre Filter Remaining
        unit: '%'
    shortcuts:
        ...

in my case with Mi Air purifiers the entity_id would me sensor.office_nanoprotect_filter_lifetime_remaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants