This commit is contained in:
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
Reference in New Issue
Block a user