2
Solved

Custom Notification Icon can't use any variables

I tried creating a battery status of my Mi Band 5 using notify but I noticed that only % appears but the value of the variable is correct. (Ex: 26)

I also tried putting the number manually, it works. But if I'm using variable, it's not working. I even tried using Variable set just to convert the match from A1 to another variable but it also doesn't work and it shows %b instead. Meaning, it's not really converting the variable into its value. Just %battery. 

    Profile: Mi Band Battery Status

     Event: Logcat Entry [ Output Variables:* Component:BluetoothRemoteDevices Filter:Updated device EC:FC:51:A5:B6:35 battery level Grep Filter (Check Help):Off ]

    

    

    

    Enter Task: Mi Band Battery Status

    

    A1: Simple Match/Regex [

         Type: Simple

         Text: %lc_text

         Match Pattern: Updated device EC:FC:51:A5:B6:35 battery level to #mi_band_battery ]

    

    A2: Variable Set [

         Name: %battery

         To: %mi_band_battery

         Structure Output (JSON, etc): On ]

    

    A3: Notify [

         Title: Mi Band Battery: %mi_band_battery%

         Icon: %battery

         Number: 0

         Priority: 100

         Repeat Alert: On

         LED Colour: Pink

         LED Rate: 0

         Category: Mi Band Battery Status ]

    

    

1 reply

Hi there, thanks for the report! Can you please try this version? https://drive.google.com/file/d/19w0kkEle9oinGusDHMe-1f1u6_xuuifD/view?usp=sharing

If you want you can also check any previous releases here: https://drive.google.com/drive/folders/1GW55YKFiuOZhJVswnt_BQUCJoGm36ugF?usp=sharing

AO

Thank you for the response. I just tested it and it works now but when I use 3 digits or characters  (ex: 100 or abc), it only shows 10 or ab. 

Yes, there's not enough space to fit all characters. Only 2 will fit. Glad it works! :)

Topic is closed for comments