fix(dashboard): dont use crypto randomUUID
Some checks failed
Build and Publish Docker Image / build-and-push (push) Failing after 2m38s
Some checks failed
Build and Publish Docker Image / build-and-push (push) Failing after 2m38s
use nanoid for jrpc request id generation instead Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -4,7 +4,6 @@ export const ZIGBEE_DEVICE = {
|
||||
deskLamp: "desk_lamp",
|
||||
livingRoomFloorLamp: "living_room_floor_lamp",
|
||||
} as const
|
||||
export type ZigbeeDeviceName = (typeof ZIGBEE_DEVICE)[keyof typeof ZIGBEE_DEVICE]
|
||||
|
||||
export type ZigbeeDeviceStates = {
|
||||
[ZIGBEE_DEVICE.deskLamp]: {
|
||||
@@ -26,6 +25,8 @@ export type ZigbeeDeviceStates = {
|
||||
}
|
||||
}
|
||||
|
||||
export const ALL_ZIGBEE_DEVICE_NAMES: ZigbeeDeviceName[] = Object.values(ZIGBEE_DEVICE)
|
||||
export type ZigbeeDeviceName = keyof ZigbeeDeviceStates
|
||||
|
||||
export type ZigbeeDeviceState = ZigbeeDeviceStates[keyof ZigbeeDeviceStates]
|
||||
export type ZigbeeDeviceState<DeviceName extends ZigbeeDeviceName = ZigbeeDeviceName> = ZigbeeDeviceStates[DeviceName]
|
||||
|
||||
export const ALL_ZIGBEE_DEVICE_NAMES: ZigbeeDeviceName[] = Object.values(ZIGBEE_DEVICE)
|
||||
|
||||
Reference in New Issue
Block a user