ayushsharma82 / ESP-DASH

Blazing fast library to create a functional, on-device dashboard for ESP8266 / ESP32 / RP2040
https://espdash.pro
GNU General Public License v3.0
977 stars 200 forks source link

Status card stays in status "idle" (grey) #206

Closed dash-user closed 9 months ago

dash-user commented 9 months ago

Went from v.4.03 to 4.04 and now the status card color does not change anymore. Stays grey, no matter what status it is set to.

ayushsharma82 commented 9 months ago

@mathieucarbou Can you check? We need to check the symbol parameter alone for updates too. It is possible that value remains same but the symbol got changed.

ayushsharma82 commented 9 months ago

I did fix it recently, maybe it got reverted in latest PR.

ayushsharma82 commented 9 months ago

@dash-user I noticed what's the problem. We recently changed the status card values to:

  1. s for success
  2. w for warning
  3. d for danger
  4. i for idle

Please update your code accordingly. I'll update the docs.

dash-user commented 9 months ago

Works like a charm again. Thanks

@.***

PPlease consider the environment before printing this email

Am 10.02.2024 um 10:11 schrieb Ayush Sharma @.***>:

@dash-user https://github.com/dash-user I noticed what's the problem. We recently changed the status card values to:

s for success w for warning d for danger i for idle Please update your code accordingly. I'll update the docs.

— Reply to this email directly, view it on GitHub https://github.com/ayushsharma82/ESP-DASH/issues/206#issuecomment-1936948097, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGBHFJX545M6J3JZWLBB63DYS42VXAVCNFSM6AAAAABDBN6POCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWHE2DQMBZG4. You are receiving this because you were mentioned.

ayushsharma82 commented 9 months ago

Great 👍

mathieucarbou commented 9 months ago

@ayushsharma82 @dash-user : the values transiting through websocket have been changed for memory / speed efficiency.

In your app, you must not use these "transient" values directly (which are only there for com efficiency) but the constants instead:

#define DASH_STATUS_IDLE "i"
#define DASH_STATUS_SUCCESS "s"
#define DASH_STATUS_WARNING "w"
#define DASH_STATUS_DANGER "d"

Constants didn't change, only the associated values has changed.

I am using both Pro and OSS version and symbol update works fine.

dash-user commented 9 months ago

Did that now. Thanks for the info. I used the char arrays because neither in the docs nor in the examples I could find any indication that there already were compiler directives defined for the statuses.