Adds Home Assistant support for Xaibatsu
This commit is contained in:
@@ -21,8 +21,9 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate, Serv
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
|
||||
_serverMultiplex.delegate = self
|
||||
_serverMultiplex.addServer(HubitatServer(URL(string: "https://midna.xionsf.com:6000/apps/api/1/")!))
|
||||
_serverMultiplex.addServer(WemoServer(URL(string: "http://midna.xionsf.com:5000")!))
|
||||
_serverMultiplex.addServer(HomeAssistantServer(URL(string: "https://ha.xaibatsu.com/api")!))
|
||||
// _serverMultiplex.addServer(HubitatServer(URL(string: "https://midna.xionsf.com:6000/apps/api/1/")!))
|
||||
// _serverMultiplex.addServer(WemoServer(URL(string: "http://midna.xionsf.com:5000")!))
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder)
|
||||
|
||||
@@ -124,6 +124,7 @@ class SwitchesViewController: UIViewController,
|
||||
var snapshot = _collectionViewDataSource.snapshot()
|
||||
snapshot.deleteItems(snapshot.itemIdentifiers(inSection: SwitchesViewController.switchCellsSectionIdentifier))
|
||||
snapshot.appendItems(self.devices.map { $0.hashValue }, toSection: SwitchesViewController.switchCellsSectionIdentifier)
|
||||
snapshot.reloadSections([Self.actionCellsSectionIdentifier])
|
||||
_collectionViewDataSource.apply(snapshot, animatingDifferences: false)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user