From d579d69e9d8139053aa04d918f5d39bfabf78112 Mon Sep 17 00:00:00 2001 From: "Stian B. Barmen" Date: Wed, 24 Jul 2024 10:33:46 +0200 Subject: [PATCH] Add configurable options for GPSD --- gpsd2mqtt/config.yaml | 3 ++- gpsd2mqtt/run.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gpsd2mqtt/config.yaml b/gpsd2mqtt/config.yaml index 65e4c66..4435bb5 100644 --- a/gpsd2mqtt/config.yaml +++ b/gpsd2mqtt/config.yaml @@ -5,7 +5,7 @@ description: >- Installation requires you to set up a username and password to publish to MQTT. Also you must select the serial device for GPSD in configuration. url: https://github.com/corvy/ha-addons/tree/main/gpsd2mqtt -version: "2024.7.0_b4" +version: "2024.7.0_b5" slug: "gpsd2mqtt" codenotary: "stian@barmen.nu" init: false @@ -35,6 +35,7 @@ schema: mqtt_username: str? mqtt_pw: str? mqtt_state: str? + gpsd_options: str? debug: bool? ports: 2947/tcp: null diff --git a/gpsd2mqtt/run.sh b/gpsd2mqtt/run.sh index 48230db..0d6aab0 100644 --- a/gpsd2mqtt/run.sh +++ b/gpsd2mqtt/run.sh @@ -4,7 +4,8 @@ CONFIG_PATH="/data/options.json" DEVICE=$(bashio::config 'device') BAUDRATE=$(bashio::config 'baudrate' 9600) -GPSD_OPTIONS="--nowait --readonly --listenany" +GPSD_OPTIONS=$(bashio::config 'gpsd_options') +GPSD_OPTIONS="${GPSD_OPTIONS} --nowait --readonly --listenany" GPSD_SOCKET="-F /var/run/gpsd.sock" CHARSIZE=$(bashio::config 'charsize' 8) PARITY=$(bashio::config 'parity' false)