From 64426c15b5d256d303ca7292fa48deae48e0c4e9 Mon Sep 17 00:00:00 2001 From: "blues-hub-automation[bot]" <271024864+blues-hub-automation[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 17:16:23 +0000 Subject: [PATCH] Update Notecard API from upstream schema changes (32f1b6cbb0c51e920b341ffc14026290587ce57b) --- notecard/card.py | 8 ++++---- notecard/env.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notecard/card.py b/notecard/card.py index b1643e1..93a06fb 100644 --- a/notecard/card.py +++ b/notecard/card.py @@ -349,10 +349,10 @@ def locationMode(card, delete=None, lat=None, lon=None, max=None, minutes=None, Args: card (Notecard): The current Notecard object. delete (bool): Set to `true` to delete the last known location stored in the Notecard. - lat (float): When in periodic or continuous mode, providing this value enables geofencing. The value you provide for this argument should be the latitude of the center of the geofence, in degrees. When in fixed mode, the value you provide for this argument should be the latitude location of the device itself, in degrees. - lon (float): When in periodic or continuous mode, providing this value enables geofencing. The value you provide for this argument should be the longitude of the center of the geofence, in degrees. When in fixed mode, the value you provide for this argument should be the longitude location of the device itself, in degrees. - max (int): Meters from a geofence center. Used to enable geofence location tracking. - minutes (int): When geofence is enabled, the debounce period in minutes for transitions across the geofence boundary. The Notecard reports a transition the first time a GPS fix lands on the opposite side of the boundary from the previous one, then ignores further transitions for this many minutes. + lat (float): When in periodic or continuous mode, providing this value enables ringfencing. The value you provide for this argument should be the latitude of the center of the ringfence, in degrees. When in fixed mode, the value you provide for this argument should be the latitude location of the device itself, in degrees. + lon (float): When in periodic or continuous mode, providing this value enables ringfencing. The value you provide for this argument should be the longitude of the center of the ringfence, in degrees. When in fixed mode, the value you provide for this argument should be the longitude location of the device itself, in degrees. + max (int): Meters from a ringfence center. Used to enable ringfence location tracking. If `lat` and `lon` are omitted, the ringfence is centered on the Notecard's current location. + minutes (int): When ringfence is enabled, the debounce period in minutes for transitions across the ringfence boundary. The Notecard reports a transition the first time a GPS fix lands on the opposite side of the boundary from the previous one, then ignores further transitions for this many minutes. mode (str): Sets the location mode. seconds (int): When in `periodic` mode, location will be sampled at this interval, if the Notecard detects motion. If seconds is < 300, during periods of sustained movement the Notecard will leave its onboard GPS/GNSS on continuously to avoid powering the module on and off repeatedly. threshold (int): When in `periodic` mode, the number of motion events (registered by the built-in accelerometer) required to trigger GPS to turn on. diff --git a/notecard/env.py b/notecard/env.py index 9707bdc..40d73f4 100644 --- a/notecard/env.py +++ b/notecard/env.py @@ -43,7 +43,7 @@ def get(card, name=None, names=None, time=None): card (Notecard): The current Notecard object. name (str): The name of the environment variable (case-insensitive). Omit to return all environment variables known to the Notecard. names (list): A list of one or more variables to retrieve, by name (case-insensitive). - time (int): Request a modified environment variable or variables from the Notecard, but only if modified after the time provided. + time (int): Use to fetch variables only when something has changed. Pass the `time` from a previous `env.get` or `env.modified` response. If no environment variable has changed since then, the request returns an `{env-not-modified}` error. Returns: dict: The result of the Notecard request. @@ -64,7 +64,7 @@ def modified(card, time=None): Args: card (Notecard): The current Notecard object. - time (int): Request whether the Notecard has detected an environment variable change since a known epoch time. + time (int): The `time` from a previous `env.modified` or `env.get` response. If no environment variable has changed since then, the request returns an `{env-not-modified}` error instead of a new `time`. Returns: dict: The result of the Notecard request.