Hello,
I have a json file on my local HD that is updated every minute. It has 18 binary values in it. Can I do this in one sensor call in my configuration file or do I have to split it into 18 sensor definitions?
Thanks in advance.
SAMPLE FILE:
{“11”: false, “10”: false, “13”: false, “12”: false, “15”: false, “14”: false, “17”: true, “16”: false, “18”: true, “1”: true, “3”: false, “2”: false, “5”: false, “4”: false, “7”: true, “6”: false, “9”: false, “8”: true}
SAMPLE SENSOR DEFINITION:
-
platform: command_line
command: python3 -c “import requests; print(requests.get(‘home/hass/binarystatus.json’).json()[‘1’])”
name: Front_Door -
platform: command_line
command: python3 -c “import requests; print(requests.get(‘home/hass/binarystatus.json’).json()[‘2’])”
name: Side_Door