mirror of
https://github.com/home-assistant/iOS.git
synced 2026-02-08 06:11:05 -06:00
<!-- Thank you for submitting a Pull Request and helping to improve Home Assistant. Please complete the following sections to help the processing and review of your changes. Please do not delete anything from this template. --> ## Summary <!-- Provide a brief summary of the changes you have made and most importantly what they aim to achieve --> Integration PR: https://github.com/home-assistant/core/pull/121496#event-13420408451 ## Screenshots <!-- If this is a user-facing change not in the frontend, please include screenshots in light and dark mode. --> ## Link to pull request in Documentation repository <!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" --> Documentation: home-assistant/companion.home-assistant# ## Any other notes <!-- If there is any other information of note, like if this Pull Request is part of a bigger change, please include it here. -->
51 lines
1.4 KiB
Swift
51 lines
1.4 KiB
Swift
import Foundation
|
|
import ObjectMapper
|
|
|
|
public class ConfigResponse: Mappable {
|
|
public var Components: [String] = []
|
|
public var Version: String = ""
|
|
public var hassDeviceId: String?
|
|
|
|
public var TemperatureUnit: String?
|
|
public var LengthUnit: String?
|
|
public var MassUnit: String?
|
|
public var PressureUnit: String?
|
|
public var VolumeUnit: String?
|
|
|
|
public var LocationName: String?
|
|
public var Timezone: String?
|
|
public var Latitude: Float?
|
|
public var Longitude: Float?
|
|
public var Elevation: Int?
|
|
|
|
public var ThemeColor: String?
|
|
|
|
public var CloudhookURL: URL?
|
|
public var RemoteUIURL: URL?
|
|
|
|
public required init?(map: Map) {}
|
|
|
|
public func mapping(map: Map) {
|
|
Components <- map["components"]
|
|
Version <- map["version"]
|
|
hassDeviceId <- map["hass_device_id"]
|
|
|
|
TemperatureUnit <- map["unit_system.temperature"]
|
|
LengthUnit <- map["unit_system.length"]
|
|
MassUnit <- map["unit_system.mass"]
|
|
PressureUnit <- map["unit_system.pressure"]
|
|
VolumeUnit <- map["unit_system.volume"]
|
|
|
|
LocationName <- map["location_name"]
|
|
Timezone <- map["time_zone"]
|
|
Latitude <- map["latitude"]
|
|
Longitude <- map["longitude"]
|
|
Elevation <- map["elevation"]
|
|
|
|
ThemeColor <- map["theme_color"]
|
|
|
|
CloudhookURL <- (map["cloudhook_url"], URLTransform())
|
|
RemoteUIURL <- (map["remote_ui_url"], URLTransform())
|
|
}
|
|
}
|