mirror of
https://github.com/home-assistant/iOS.git
synced 2026-06-17 17:49:07 -05:00
Adds new fastlane lanes: - `fastlane lint` which checks the linters - `fastlane autocorrect` which applies the linters which can autocorrect (Rubocop, SwiftFormat) Adds a build step to the Codegen abstract target which runs SwiftFormat in lint mode, pointing out what it's going to change when run. Applies SwiftFormat to nearly all code -- exempts a few externally-sourced files and generated code.
22 lines
732 B
Swift
22 lines
732 B
Swift
import Foundation
|
|
import ObjectMapper
|
|
|
|
public class Scene: Entity {
|
|
@objc dynamic var entityIDs = [String]()
|
|
@objc dynamic var backgroundColor: String?
|
|
@objc dynamic var textColor: String?
|
|
@objc dynamic var iconColor: String?
|
|
|
|
public static let backgroundColorKey = "background_color"
|
|
public static let textColorKey = "text_color"
|
|
public static let iconColorKey = "icon_color"
|
|
|
|
override public func mapping(map: Map) {
|
|
super.mapping(map: map)
|
|
entityIDs <- map["attributes.entity_id"]
|
|
backgroundColor <- map["attributes." + Self.backgroundColorKey]
|
|
textColor <- map["attributes." + Self.textColorKey]
|
|
iconColor <- map["attributes." + Self.iconColorKey]
|
|
}
|
|
}
|