Move config to dist file to allow pull without conflict
This commit is contained in:
parent
fdbc47384f
commit
69d7852d16
|
@ -1,6 +1,6 @@
|
|||
# Project specific
|
||||
|
||||
config.local.ini
|
||||
config.ini
|
||||
|
||||
|
||||
# Created by https://www.gitignore.io/api/python
|
||||
|
|
14
README.md
14
README.md
|
@ -59,11 +59,19 @@ cd /opt/miflora-mqtt-daemon
|
|||
sudo pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
To match personal needs, all operation details can be configured using the file [`config.ini`](config.ini).
|
||||
The daemon depends on `gatttool`, an external tool provided by the package `bluez` installed just now.
|
||||
Make sure gatttool is available on your system by executing the command once:
|
||||
|
||||
```shell
|
||||
gatttool --help
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
To match personal needs, all operation details can be configured using the file [`config.ini`](config.ini.dist).
|
||||
|
||||
```shell
|
||||
cp /opt/miflora-mqtt-daemon/config.{ini.bak,ini}
|
||||
vim /opt/miflora-mqtt-daemon/config.ini
|
||||
```
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ def flores_to_openhab_items(flores, reporting_mode):
|
|||
# Load configuration file
|
||||
config = ConfigParser(delimiters=('=', ))
|
||||
config.optionxform = str
|
||||
config.read([os.path.join(sys.path[0], 'config.ini'), os.path.join(sys.path[0], 'config.local.ini')])
|
||||
config.read([os.path.join(sys.path[0], 'config.ini.dist'), os.path.join(sys.path[0], 'config.ini')])
|
||||
|
||||
reporting_mode = config['General'].get('reporting_method', 'mqtt-json')
|
||||
daemon_enabled = config['Daemon'].getboolean('enabled', True)
|
||||
|
|
Loading…
Reference in New Issue