AutoNotification Get Tile State and Change Dynamically

Discussion in 'AutoApps' started by Soloam, Mar 26, 2019.

  1. Soloam

    Soloam New Member

    Joined:
    Jan 11, 2017
    Messages:
    11
    Likes Received:
    0
    Hello, I'm using autonotification to create tiles on the fly! But the only way that I am able to do it at the moment is to check the sate (on or off) of the income message, and create the tile active or inactive, 2 separate autonotification calls inside a if or else! Is it possible to pass a variable to influence the tile state?

    Also when I click the tile I call a function on tasker that will call a service in my server! I would like to toggle the state of the tile and detect what is the new sate to send the correct value to the server!

    The way that I have on the moment is to detect the change of the tile .. Send to the server the toggle command on the server I toggle the action and return the new sate to tasker to update the tile state! But I would prefere to send the correct command (on or off) but for that I need to know the correct state of the tile!

    One ideia is to create the tile with a command with that information (turn on or turn off) , is that the best solution?

    Thank you
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    I think you should probably keep a Global Tasker variable with the state and then update the tile based on that :)
     

Share This Page