Skip to content

Commit

Permalink
added custom accessory for StatelessProgrammableSwitch
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMisfit68 committed Dec 18, 2023
1 parent ef089a2 commit 8e4ba84
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
import Foundation
import HAP

#warning("TODO") // TODO: - Create a pull request to get this implemented by HAP itself
extension HAP.Accessory {
open class ProgrammableSwitch: Accessory {
public let primaryService:Service.StatelessProgrammableSwitch = Service.StatelessProgrammableSwitch()
#warning("TODO") // TODO: - Create a pull request to get this implemented into HAP itself
extension Accessory {

open class StatelessProgrammableSwitch: Accessory {
public let primaryService:Service.StatelessProgrammableSwitch = Service.StatelessProgrammableSwitch(characteristics: [.name(String(localized: "Function key",table: "ServiceNames"))])

public init(info: Service.Info, additionalServices: [Service] = []) {
super.init(info: info, type: .programmableSwitch, services: [primaryService] + additionalServices)
}
}

}

0 comments on commit 8e4ba84

Please sign in to comment.