question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lovelace Card not getting updated with recent state value

See original GitHub issue

Before submitting a bug

[ x ] I updated to the latest version available [ x ] I cleared the cache of my browser

Describe the bug

I managed to configure the card quite nicely with Xiaomi Air Purifier 3c and everytihng is working properly (will add the code below), even the AQI is working, but the issue is that the states are not getting updated regularly (AQI, RPMs, Filter %, etc.). If I turn it on/off, interact with the card in any way or reload the browser, all states will get updated immediately, but if I leave it like that, nothing gets updated. Also if I call a service, to put on the child lock like:

shortcuts:
  - name: Child Lock
    icon: mdi:lock
    service: switch.toggle
    service_data:
      entity_id: switch.mi_air_purifier_3c_2_child_lock

It works perfectly, but I get the loading circle and the card stops responding. It fixes itself on browser reload.

image

Steps to reproduce

  1. Install repo
  2. Add lovelace card with the following code:
type: custom:purifier-card
entity: fan.mi_air_purifier_3c_1
stats:
  - entity_id: sensor.mi_air_purifier_3c_1_filter_life_remaining
    unit: '%'
    subtitle: Filter Remaining
  - entity_id: sensor.mi_air_purifier_3c_1_motor_speed
    unit: rpm
    subtitle: Motor Speed
shortcuts:
  - name: Auto
    icon: mdi:brightness-auto
    preset_mode: Auto
  - name: Silent
    icon: mdi:weather-night
    preset_mode: Silent
  - name: 25%
    icon: mdi:circle-slice-2
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.mi_air_purifier_3c_1_favorite_motor_speed
      value: '750'
  - name: 50%
    icon: mdi:circle-slice-4
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.mi_air_purifier_3c_1_favorite_motor_speed
      value: '1250'
  - name: 75%
    icon: mdi:circle-slice-6
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.mi_air_purifier_3c_1_favorite_motor_speed
      value: '1700'
  - name: 100%
    icon: mdi:circle-slice-8
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.mi_air_purifier_3c_1_favorite_motor_speed
      value: '2200'
  - name: Child Lock
    icon: mdi:lock
    service: switch.toggle
    service_data:
      entity_id: switch.mi_air_purifier_3c_2_child_lock
show_name: true
show_state: true
show_toolbar: true
compact_view: true
aqi:
  entity_id: sensor.mi_air_purifier_3c_1_pm2_5
  unit: µg/m³

Expected behavior The card to get updated on a regular basis with most recent state values.

Versions:

  • Release: v1.0.1
  • Browser: Chrome & Fully Kiosk
  • HomeAssistant version: core-2021.11.5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
denysdovhancommented, Dec 2, 2021

@austwhite the issue you are describing is fixed in the latest release 2.0.0. The card got some major changes, so hopefully the issue will be resolved. Please, reopen if you still have this issue after upgrading to the latest version.

0reactions
austwhitecommented, Dec 2, 2021

@denysdovhan Almost perfect again now on my system. Just a small bug where the icons do not highlight for 25, 50 and 75 percent speeds. Full speed, silent and auto highlight. Fan speed changes correctly, this is just a visual bug.

Appreciate your help with this. I’ll send you a donation later in the week after I return from my business trip 😃

Edit: Worked out where the bug may be. Xiaomi Air Purfier 3 only has 3 fan speed settings. Low, Med , High (33%, 66% and 100%) Not four. 😃 All good now 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Last_updated State and last-changed in Lovelave
My sensor appears to not have a last_updated attribute: And yet Lovelace can show it's last-changed How? entities: - entity: ...
Read more >
Light entity card home assistant - Agenzia traduzioni Terni
Extracts brightness state using Dimmer value from received mqtt json which ... If set to False, entity will need to notify Home Assistant...
Read more >
Home Assistant...I'm done. I quit. It's over. - Make Life Click
I installed Home Assistant first on my Mac Mini, got a nice interface going with it when Lovelace was about to become the...
Read more >
ApexCharts Tutorial: Advanced Graphs For Your HA UI
The ApexCharts Card does not include a built-in UI editor, ... which enables you to build your own data out of the last...
Read more >
Dwains Lovelace Dashboard | An fully auto generating Home ...
I would to ask you if you are running Dwains Dashboard to enable the new HA ... Fixed bug that outside_temperature is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found