Created
March 21, 2019 18:26
-
-
Save ptath/85670ef17859c649eeab7c927a9c8f04 to your computer and use it in GitHub Desktop.
Part of HomeBridge config for homebridge-mqttting and sonoff-tasmota, temperature and humidity sensor (DHT11)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"accessories": [ | |
{ | |
"accessory": "mqttthing", | |
"type": "temperatureSensor", | |
"name": "temp1", | |
"url": "mqtt://192.168.1.10", | |
"caption": "Метка 1", | |
"topics": { | |
"getCurrentTemperature": { | |
"topic": "tele/esptest/SENSOR", | |
"apply": "return parseFloat(JSON.parse(message).DHT11.Temperature);" | |
} | |
} | |
}, | |
{ | |
"accessory": "mqttthing", | |
"type": "humiditySensor", | |
"name": "hum1", | |
"url": "mqtt://192.168.1.10", | |
"caption": "Метка 2", | |
"topics": { | |
"getCurrentRelativeHumidity": { | |
"topic": "tele/esptest/SENSOR", | |
"apply": "return parseFloat(JSON.parse(message).DHT11.Humidity);" | |
} | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment