ttn
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-12-07 19:52:00 +01:00
parent ad34f9b27b
commit 77ac44742b
2 changed files with 6 additions and 8 deletions

View File

@ -5,16 +5,12 @@
},
"topicMappings": [
{
"topics": [ "shellyplusht/+/status/temperature:0" ],
"handler": "SVEJ",
"id": "SVE3",
"topics": [ "ttn/#" ],
"handler": "TTN",
"id": "TTN0",
"config": {
"databaseConnStr": "",
"attributes": {
"application": "Temperature Shelly Plus HT",
"deviceSelector": "T:1",
"valueSelector": "J:$.tC",
"unitSelector": "C:°C"
}
}
}

View File

@ -2,6 +2,7 @@ package ttn
import "log"
import "fmt"
import "udi/config"
import "udi/handlers/handler"
var idSeq int = 0
@ -10,7 +11,8 @@ type TTNHandler struct {
id int
}
func NewTTNHandler() handler.Handler {
func NewTTNHandler(config config.HandlerConfigT) handler.Handler {
t := &TTNHandler {
id: idSeq,
}