From d0b58ba883a28f49894e907ff14b37cf24b468c7 Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 4 Aug 2024 13:58:51 +0200 Subject: [PATCH] chore: remove empty device type from devices api (#15228) --- server/http_config_device_handler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/http_config_device_handler.go b/server/http_config_device_handler.go index fabc97117..ff9403f92 100644 --- a/server/http_config_device_handler.go +++ b/server/http_config_device_handler.go @@ -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 {