From 96b8a2939652e8fe812e35a329fa0ed1be27fe63 Mon Sep 17 00:00:00 2001 From: Tavis Date: Sun, 19 Jul 2026 16:44:04 -0700 Subject: [PATCH 1/3] pollencount: Add hide-when-low option and update description. Skip rendering when all pollen types are very low (0) if enabled, and remove the outdated Tomorrow.io reference from the app description. Co-authored-by: Cursor --- apps/pollencount/manifest.yaml | 2 +- apps/pollencount/pollen_count.star | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/pollencount/manifest.yaml b/apps/pollencount/manifest.yaml index 759dc4905..28b16899b 100644 --- a/apps/pollencount/manifest.yaml +++ b/apps/pollencount/manifest.yaml @@ -2,7 +2,7 @@ id: pollen-count name: Pollen Count summary: Pollen count for your area -desc: Displays a pollen count for your area. Enter your location for updates every 12 hours on the current conditions in your town, as well as which types of pollen are in the air today. Get your Secret key by creating a developer account on tomorrow.io. +desc: Displays a pollen count for your area. Enter your location for updates every 12 hours on the current conditions in your town, as well as which types of pollen are in the air today. Requires a Google Maps Platform API key with the Pollen API enabled. author: Nicole Brooks fileName: pollen_count.star packageName: pollencount diff --git a/apps/pollencount/pollen_count.star b/apps/pollencount/pollen_count.star index 6489fce3a..22ae1dbb9 100644 --- a/apps/pollencount/pollen_count.star +++ b/apps/pollencount/pollen_count.star @@ -50,11 +50,15 @@ def main(config): lng = float(loc.get("lng")) dev_key = config.str("dev_key", "") + hide_when_low = config.bool("hide_when_low", False) # make API call and cache result print("calling API") todaysCount = getTodaysCount(lat, lng, dev_key) + if hide_when_low and allPollenVeryLow(todaysCount): + return [] + firstMixin = None secondMixin = None if "message" in todaysCount: @@ -215,6 +219,16 @@ def getTodaysCount(lat, lng, dev_key): return result +def allPollenVeryLow(indexes): + if "message" in indexes: + return False + + for indexName in ["treeIndex", "grassIndex", "weedIndex"]: + if indexName not in indexes or indexes[indexName] != 0: + return False + + return True + # Get total average of pollen indexes to two decimal points. def getAverage(indexes): total = 0 @@ -337,6 +351,13 @@ def get_schema(): icon = "key", secret = True, ), + schema.Toggle( + id = "hide_when_low", + name = "Hide When All Very Low", + desc = "Skip this app when all pollen types are very low (0).", + icon = "eyeSlash", + default = False, + ), ], ) From d694f4f90fd095d2451aedbe60dc00702dbc1349 Mon Sep 17 00:00:00 2001 From: Tavis Date: Sun, 19 Jul 2026 16:48:39 -0700 Subject: [PATCH 2/3] pollencount: Replace hide toggle with minimum level dropdown. Let users choose the lowest pollen level worth showing, hiding the app when all types fall below that threshold. Co-authored-by: Cursor --- apps/pollencount/pollen_count.star | 31 +++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/apps/pollencount/pollen_count.star b/apps/pollencount/pollen_count.star index 22ae1dbb9..a5737467e 100644 --- a/apps/pollencount/pollen_count.star +++ b/apps/pollencount/pollen_count.star @@ -39,6 +39,13 @@ COLORS = { } DEFAULT_TIMEZONE = "America/New_York" API_URL_BASE = "https://pollen.googleapis.com/v1/forecast:lookup?days=1&location.latitude=" +MIN_LEVEL_OPTIONS = [ + schema.Option(display = "Always show", value = "0"), + schema.Option(display = "Low", value = "2"), + schema.Option(display = "Moderate", value = "3"), + schema.Option(display = "High", value = "4"), + schema.Option(display = "Very High", value = "5"), +] def main(config): print("Initializing Pollen Count...") @@ -50,13 +57,14 @@ def main(config): lng = float(loc.get("lng")) dev_key = config.str("dev_key", "") - hide_when_low = config.bool("hide_when_low", False) + min_level = int(config.get("min_level", "0")) # make API call and cache result print("calling API") todaysCount = getTodaysCount(lat, lng, dev_key) - if hide_when_low and allPollenVeryLow(todaysCount): + if shouldHideBelowMinLevel(todaysCount, min_level): + print("Hiding app: all pollen types below minimum level %d" % min_level) return [] firstMixin = None @@ -219,12 +227,16 @@ def getTodaysCount(lat, lng, dev_key): return result -def allPollenVeryLow(indexes): +def shouldHideBelowMinLevel(indexes, min_level): + if min_level <= 0: + return False + if "message" in indexes: return False + # Missing types are out of season and count as 0. for indexName in ["treeIndex", "grassIndex", "weedIndex"]: - if indexName not in indexes or indexes[indexName] != 0: + if indexes.get(indexName, 0) >= min_level: return False return True @@ -351,12 +363,13 @@ def get_schema(): icon = "key", secret = True, ), - schema.Toggle( - id = "hide_when_low", - name = "Hide When All Very Low", - desc = "Skip this app when all pollen types are very low (0).", + schema.Dropdown( + id = "min_level", + name = "Minimum Level to Show", + desc = "Hide the app when all pollen types are below this level.", icon = "eyeSlash", - default = False, + options = MIN_LEVEL_OPTIONS, + default = "0", ), ], ) From da1637a33ee893f45fc601af83b5ee2777d0a34a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Jul 2026 23:51:34 +0000 Subject: [PATCH 3/3] chore: auto-update manifest metadata [skip ci] --- apps/pollencount/manifest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/pollencount/manifest.yaml b/apps/pollencount/manifest.yaml index 28b16899b..e2fcd08bb 100644 --- a/apps/pollencount/manifest.yaml +++ b/apps/pollencount/manifest.yaml @@ -13,4 +13,4 @@ tags: - lifestyle - utility published: '2022-05-05T11:29:06Z' -updated: '2026-06-02T02:30:50Z' +updated: '2026-07-19T23:48:39Z'