Adds Home Assistant support for Xaibatsu
This commit is contained in:
@@ -70,3 +70,9 @@ class AnyDevice : Device
|
||||
}
|
||||
|
||||
extension AnyDevice : Hashable {}
|
||||
|
||||
extension Device {
|
||||
func eraseToAnyDevice() -> AnyDevice {
|
||||
AnyDevice(self)
|
||||
}
|
||||
}
|
||||
|
||||
24
XIONControlPanel/Models/HomeAssistantDevice.swift
Normal file
24
XIONControlPanel/Models/HomeAssistantDevice.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// HomeAssistantDevice.swift
|
||||
// XIONControlPanel
|
||||
//
|
||||
// Created by James Magahern on 6/18/25.
|
||||
// Copyright © 2025 XION. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class HomeAssistantDevice: Device
|
||||
{
|
||||
var name: String
|
||||
var serial: String
|
||||
var type: DeviceType
|
||||
var state: DeviceState
|
||||
|
||||
init(name: String, serial: String, type: DeviceType, state: DeviceState) {
|
||||
self.name = name
|
||||
self.serial = serial
|
||||
self.type = type
|
||||
self.state = state
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user