Skip to content

Commit 954434b

Browse files
committed
examples: standalone: fix wttr-in alerts and config env var
1 parent 7dda25b commit 954434b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

examples/standalone/snmp-eaton-ups/docker_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ bash $SCRIPT_DIR/docker_build.sh
1111
docker run --rm -it \
1212
--network host \
1313
-e ENAPTER_LOG_LEVEL="${ENAPTER_LOG_LEVEL:-info}" \
14-
-e ENAPTER_VUCM_BLOB="$ENAPTER_VUCM_BLOB" \
14+
-e ENAPTER_STANDALONE_COMMUNICATION_CONFIG="$ENAPTER_STANDALONE_COMMUNICATION_CONFIG" \
1515
-e ENAPTER_SNMP_HOST="$ENAPTER_SNMP_HOST" \
1616
-e ENAPTER_SNMP_PORT="$ENAPTER_SNMP_PORT" \
1717
-e ENAPTER_SNMP_COMMUNITY="$ENAPTER_SNMP_COMMUNITY" \

examples/standalone/wttr-in/docker_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ docker build --tag "$IMAGE_TAG" "$SCRIPT_DIR"
1111
docker run --rm -it \
1212
--network host \
1313
-e ENAPTER_LOG_LEVEL="${ENAPTER_LOG_LEVEL:-info}" \
14-
-e ENAPTER_VUCM_BLOB="$ENAPTER_VUCM_BLOB" \
14+
-e ENAPTER_STANDALONE_COMMUNICATION_CONFIG="$ENAPTER_STANDALONE_COMMUNICATION_CONFIG" \
1515
-e WTTR_IN_LOCATION="$WTTR_IN_LOCATION" \
1616
"$IMAGE_TAG"

examples/standalone/wttr-in/script.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ async def telemetry_sender(self):
3434
while True:
3535
try:
3636
weather = await self.client.get(self.location)
37-
await self.send_telemetry({"temperature": weather.temperature})
37+
await self.send_telemetry(
38+
{"temperature": weather.temperature, "alerts": []}
39+
)
3840
except Exception as e:
3941
await self.log.error(f"failed to get weather: {e}")
4042
await self.send_telemetry({"alerts": ["wttr_in_error"]})

0 commit comments

Comments
 (0)