chore: Update tags field schema to use DeviceConfig, enhance isDevice type check, and adjust IntelliJ workspace

This commit is contained in:
Andreas Hilbig 2026-01-16 20:24:08 +01:00
parent 8e5fbc3f57
commit 0c1f585909
6 changed files with 54 additions and 17 deletions

View file

@ -12,9 +12,31 @@ interface Device implements Host {
deviceType: String
hostgroups: [HostGroup!]
name: String
tags: JSONObject
tags: DeviceConfig
state: DeviceState
}
type DeviceConfig {
deviceWidgetPreview: WidgetPreview
}
type WidgetPreview {
TOP_LEFT: DisplayFieldSpec
TOP_RIGHT: DisplayFieldSpec
BOTTOM_LEFT: DisplayFieldSpec
BOTTOM_RIGHT: DisplayFieldSpec
}
type DisplayFieldSpec {
key: String,
emptyValue: String
unit: String,
value_font_size: String
g_value_transform: String
unit_font_size: String
g_unit_transform: String
}
type OperationalDeviceData {
temperature: Float
voltage: Float
@ -53,6 +75,6 @@ type GenericDevice implements Host & Device {
deviceType: String
hostgroups: [HostGroup!]
name: String
tags: JSONObject
tags: DeviceConfig
state: GenericDeviceState
}

View file

@ -12,7 +12,7 @@ type SinglePanelDevice implements Host & Device {
deviceType: String
hostgroups: [HostGroup!]
name: String
tags: JSONObject
tags: DeviceConfig
state: PanelState
}
@ -53,7 +53,7 @@ type FourPanelDevice implements Host & Device {
deviceType: String
hostgroups: [HostGroup!]
name: String
tags: JSONObject
tags: DeviceConfig
state: FourPanelState
}
@ -72,3 +72,4 @@ type FourPanelValues {
BOTTOM_LEFT: PanelValues
BOTTOM_RIGHT: PanelValues
}

View file

@ -1,7 +1,7 @@
"""
DistanceTracker represents a device which can detect other devices around itself and estimate
the distances, e.g. by using Bluetooth scanning technology and estimating the distance by .
Optionally the
the distances, e.g. by using Bluetooth scanning technology and estimating the distance.
"""
type DistanceTrackerDevice implements Host & Device {
hostid: ID!
@ -12,7 +12,7 @@ type DistanceTrackerDevice implements Host & Device {
deviceType: String
hostgroups: [HostGroup!]
name: String
tags: JSONObject
tags: DeviceConfig
state: DistanceTrackerState
}

View file

@ -15,7 +15,6 @@ interface Host {
host: String!
hostgroups: [HostGroup!]
name: String
tags: JSONObject
"""
Specifies the type or category of the device. Used to define the classification
of a device in the system (capabilities, functionalities, or purpose).