tasmota device name
This commit is contained in:
parent
735828988f
commit
15af5bc2e8
|
@ -151,7 +151,7 @@ func main() {
|
||||||
for d := range tasmota_msgs {
|
for d := range tasmota_msgs {
|
||||||
log.Printf(" [ ] %s: %s", d.RoutingKey, d.Body)
|
log.Printf(" [ ] %s: %s", d.RoutingKey, d.Body)
|
||||||
parts := strings.Split(d.RoutingKey, ".")
|
parts := strings.Split(d.RoutingKey, ".")
|
||||||
device := strings.Join(parts[1:len(parts)-2], ".")
|
device := strings.Join(parts[1:len(parts)-1], ".")
|
||||||
|
|
||||||
// read body as json
|
// read body as json
|
||||||
var values map[string]interface{}
|
var values map[string]interface{}
|
||||||
|
|
Loading…
Reference in New Issue