Created
January 9, 2022 17:21
-
-
Save stas-dovgodko/b6c0ece8b38519533cd6e12da8452db9 to your computer and use it in GitHub Desktop.
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
let proxy = require('openhab-proxy-pattern'); | |
proxy.bind("GF_Office_Co2", "Netatmo_Indoor_Co2") | |
.update(function(value) { | |
const ppm = parseInt(value); | |
return (typeof value == 'string') ? `${ppm} ppm` : undefined; | |
}); | |
proxy.bind("GF_Office_Humidity", "Netatmo_Indoor_Humidity") | |
.update(function(value) { | |
const v = parseInt(value); | |
return (typeof value == 'string') ? `${v} %` : undefined; | |
}); | |
proxy.bind("GF_Office_Temperature", "Netatmo_Indoor_Temperature") | |
.update(function(value) { | |
const v = parseInt(value); | |
return (typeof value == 'string') ? `${v} °C` : undefined; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment