Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 99268

Command line JSON to sensor

$
0
0

@larskuffer wrote:

Hi,
so I’m trying to add several sensors that I’m pulling out with a command.

so far I’m trying to add a sensor in the configuration.yaml file like this:

sensor:
  - platform: command_line
    command: "ssh root@192.168.1.213 'python /root/bacnet.py'"
    scan_interval: 300
    name: regulux

Here’s my result from the command:

{
    "a001allgemein_f01uberspannungsschutz": {
        "id": "Lamp_16845036",
        "name": "F01 u\u0308berspannungsschutz",
        "type": "O",
        "unit": "",
        "value": "2"
    },
    "a001allgemein_intiwgemessenetaupunktt": {
        "id": "16845098",
        "name": "INT IW gemessene Taupunkt T\u00b0",
        "type": "P",
        "unit": "\u00b0C",
        "value": "28.5"
    },
    "a001allgemein_quittierenaktiv": {
        "id": "Lamp_16844948",
        "name": "Quittieren aktiv",
        "type": "O",
        "unit": "",
        "value": "0"
    },
    "hk01nord_west_wand_b01iwvorlauft": {
        "id": "16846027",
        "name": "B01 IW Vorlauf T\u00b0",
        "type": "P",
        "unit": "\u00b0C",
        "value": "22.2"
    }
}

Is there a way to add all those sensors at once without having to add them one by one?

thanks for any help
Lars

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 99268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>