iOS/Sources/Extensions/Widgets/ControlRefreshDelay.swift
Bruno Pantaleão Gonçalves b78cf2e003
Fix iOS controls state (#3114)
2024-10-31 17:50:19 +01:00

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)
}
}