1. Check out our companion app, Forums for Android! Download from Google Play

%LIGHT Returns Value "%LIGHT"

Discussion in 'Android Apps & Games' started by digit27, Sep 29, 2012.

  1. digit27

    digit27 Active Member
    Thread Starter
    15

    Sep 23, 2012
    32
    0
    15
    When I make a variable and set it to $LIGHT it changes to "$LIGHT" instead of a number like i was expecting...it does this whether ambient light is bright or dim. I have tried with auto brightness both enabled and disabled, tho auto brightness turns on automatically wen i enable a profile using the 'variable set' task, even before it runs the task. Anyone know why the %LIGHT isn't returning a reading?
     

    Advertisement

  2. SUroot

    SUroot Well-Known Member
    1,123

    May 25, 2010
    23,925
    5,304
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Was light in "quotation marks"?
     
  3. digit27

    digit27 Active Member
    Thread Starter
    15

    Sep 23, 2012
    32
    0
    15
    No...I could see how that would cause it, but I didn't put quotation marks. I actually selected it from the list of variables.
     
  4. Is there a space before the %?
     
  5. digit27

    digit27 Active Member
    Thread Starter
    15

    Sep 23, 2012
    32
    0
    15
    No, no space before...and still just returning %LIGHT. I don't have this problem with any other built in variable.. I tried to make my own variable called %LIGHT to see if Tasker is recognizing it as a variable and Tasker wouldn't make it, so I guess it does. Auto brightness is working so I'm assuming the light sensor does work.... I wonder if other LG/G2X phones have this problem?
     
  6. electricpete

    electricpete Well-Known Member
    393

    Jan 7, 2012
    2,053
    1,006
    393
    Male
    Electrical Engineer
    Your posts seems to have a typographical error using $ instead of %
    Similar typo in your code might give the results you report.
     
  7. digit27

    digit27 Active Member
    Thread Starter
    15

    Sep 23, 2012
    32
    0
    15
    I'm surprised I didn't notice that typo so i checked my code, but its correct... still no luck getting it to work.
     
  8. The original thread has some discussion about this at the end.
     

Share This Page

Loading...