1. Download our Official Android App: Forums for Android!

%LIGHT Returns Value "%LIGHT"

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

  1. digit27

    digit27 Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    32
    Joined:
    Sep 23, 2012

    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 Android Expert
    Rank:
    None
    Points:
    1,123
    Posts:
    23,925
    Joined:
    May 25, 2010

    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 Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    32
    Joined:
    Sep 23, 2012

    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. bberryhill0

    bberryhill0 Android Expert
    Rank:
     #102
    Points:
    273
    Posts:
    2,716
    Joined:
    Jan 27, 2010

    Is there a space before the %?
     
  5. digit27

    digit27 Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    32
    Joined:
    Sep 23, 2012

    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 Android Expert
    Rank:
     #77
    Points:
    393
    Posts:
    2,054
    Joined:
    Jan 7, 2012

    Jan 7, 2012
    2,054
    1,013
    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 Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    32
    Joined:
    Sep 23, 2012

    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. bberryhill0

    bberryhill0 Android Expert
    Rank:
     #102
    Points:
    273
    Posts:
    2,716
    Joined:
    Jan 27, 2010

    The original thread has some discussion about this at the end.
     

Share This Page

Loading...