mirror of
https://github.com/adamzend/Uploading-server-data-meteo-to-Lemmy-instance.git
synced 2026-10-30 19:02:00 +01:00
11 lines
389 B
Python
11 lines
389 B
Python
import json
|
|
from pathlib import Path
|
|
|
|
def config():
|
|
c = json.loads((Path(__file__).parent / 'config.example.json').read_text(encoding='utf-8'))
|
|
c['timezone'] = 'Europe/Warsaw'
|
|
c['modbus'].update(host='localhost', unit_id=8)
|
|
for key, address in [('temperature', 20), ('humidity', 23), ('pressure', 25)]:
|
|
c['sensors'][key]['address'] = address
|
|
return c
|