Rename things.

This commit is contained in:
yohan 2024-02-05 00:21:47 +01:00
parent 90e2d074ba
commit 965d1c402e
3 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,8 @@ polling_conf:
type: int
- name: Modane_elec_energy_index
type: int
script: ./get-teleinfo.py
# The output of the command must be a JSON dict with metrics name as keys and metrics value as value.
executable: ./read_teleinfo.py
arguments:
- "-f"
- "custom_json"

View File

@ -81,7 +81,7 @@ def sensors_polling(poller_conf):
# Polling
try:
logging.debug('Getting data for '+poller_conf['name'])
command = [poller_conf['script']] + poller_conf['arguments']
command = [poller_conf['executable']] + poller_conf['arguments']
returned_output = subprocess.check_output(command)
data = json.loads(returned_output.decode("utf-8"))
logging.debug('Got: '+returned_output.decode("utf-8"))