iOS/Sources/Extensions/Widgets/ControlRefreshDelay.swift

12 lines
287 B
Swift

import Foundation
enum ControlRefreshDelay {
/*
Sometimes HA state is not updated as fast as controls,
so we wait before finishing displaying it's new state
*/
static func wait() async throws {
try await Task.sleep(nanoseconds: 2 * 1_000_000_000)
}
}