![]() Time to enable the context and action on touch in the Tasker weather tutorial. Now, you have yourself a nice weather notification. Lastly, add the %city_name to the sub-text field and set the number of columns to 5. The %list_weather_main1 variable contains the current condition and it’s the best for that purpose. You can use the same method to substitute the icons for the big icon and notification icon. %list_weather_main1,%list_weather_main2,%list_weather_main3, To get the AutoNotification to vibrate in an alternative way, use the %rainalarm in the vibration pattern option of the AutoNotification Table action. If the %icon contains 9-11 in the name (matches Regex), it’s gonna rain. Variable %rainalarm is set to a specific vibration pattern. I have added another 2 actions to this loop. Recurse Variables:Off Do Maths:Off Append:Off ]Ī10: Return If you want to know more about loops, subprocesses and flow control check out this video: This way the final order in %wtime() will be the same as %list_dt(). I have 5 values so my I will be pushing all the values from the 5th position moving the previous entries up. I will push the value to the new array %wtime() starting from the bottom. I used the custom output array %timecdate() – this is where the value will be stored.īefore we can take care of another entry in the %list_dt() we have to store this value. The %time variable will take the value of each variable from the array %list_dt() and will perform the conversion using AutoTools Time action.ĪutoTools Time is set to operate in seconds (not milliseconds) and will ‘get rid off’ the date from the converted value. I have to convert each variable inside the array to the correct value. I’m only interested in the HH:MM format to be displayed. The time is stored as a value in seconds. The AutoTools Json Read action will load the cells into the arrays, but it will change the name of the relevant variables. We are unable to use the simple methods as names are not unique (see main and weather word). To access the tree structure we have to uncheck the ‘simple’ option. () – temperature (mine in C)Īs you can see, the apart from the city.name, all data is stored in arrays.This will help you understand how to access these cells using AutoTools Json Read action.įor my notification I’m using the following: Paste the data and take a look how data is organized and stored. json file is a very specific data format. To use this data we have to load it to the variable using Read File action. json file containing a data use plain text as data type and save it as weather.json. storage/emulated/0/Tasker/icons/weather/%list_weather_icon5.png, storage/emulated/0/Tasker/icons/weather/%list_weather_icon4.png, storage/emulated/0/Tasker/icons/weather/%list_weather_icon3.png, storage/emulated/0/Tasker/icons/weather/%list_weather_icon2.png, storage/emulated/0/Tasker/icons/weather/%list_weather_icon1.png, Status Bar Icon: /storage/emulated/0/Tasker/icons/weather/%list_weather_icon1.pngīig Icon: /storage/emulated/0/Tasker/icons/weather/%list_weather_icon1.pngĪ13: AutoNotification Table [ Configuration:Title: Weather: %list_weather_main1,%list_weather_main2,%list_weather_main3,%list_weather_main4,%list_weather_main5 Return Value Variable:%readyicon Stop:Off ]Ī10: Array Push Ī12: AutoNotification Table [ Configuration:Title: Weather: Parameter 1 (%par1):%icon Parameter 2 (%par2): Output Variable: timec Timeout (Seconds):30 ]Ī6: Array Push Ī8: For Ī9: Perform Task [ Name:Icons - Subroutine Priority:%priority+1 Mime Type:text/plain Output File:Download/weather.jsonĪ2: Read File Ī3: AutoTools Json Read [ Configuration:Input Format: Jsonįields: (),(),list.dt(),(),city.nameĪ4: For Ī5: AutoTools Time [ Configuration:Dates to Format: %time Path: Attributes: Cookies: User Agent: Timeout:10 State: Not Wifi Connected įorecast?lat=LAT&lon=LON&appid=APIKEY&units=metric&cnt=5
0 Comments
Leave a Reply. |