chore: remove empty device type from devices api (#15228)

This commit is contained in:
andig 2024-08-04 13:58:51 +02:00 • committed by GitHub
parent a926456315
commit d0b58ba883
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,7 +71,9 @@ func deviceConfigMap[T any](class templates.Class, dev config.Device[T]) (map[st
dc := map[string]any{
"name": conf.Name,
"type": conf.Type,
}
if conf.Type != "" {
dc["type"] = conf.Type
}
if configurable, ok := dev.(config.ConfigurableDevice[T]); ok {