Add private Home Assistant credentials settings
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
|
||||
import qs.services
|
||||
|
||||
ShellRoot {
|
||||
Component.onCompleted: HomeAssistant.fixtureMode = true
|
||||
|
||||
IpcHandler {
|
||||
target: "home-assistant-config-test"
|
||||
|
||||
function save(url: string, entities: string): bool {
|
||||
return HomeAssistantConfig.save(url, entities, "");
|
||||
}
|
||||
|
||||
function clearToken(): bool {
|
||||
return HomeAssistantConfig.clearToken();
|
||||
}
|
||||
|
||||
function refresh(): void {
|
||||
HomeAssistantConfig.refresh();
|
||||
}
|
||||
|
||||
function status(): string {
|
||||
return JSON.stringify({
|
||||
url: HomeAssistantConfig.url,
|
||||
entities: HomeAssistantConfig.entities,
|
||||
tokenConfigured: HomeAssistantConfig.tokenConfigured,
|
||||
configured: HomeAssistantConfig.configured,
|
||||
busy: HomeAssistantConfig.busy,
|
||||
lastError: HomeAssistantConfig.lastError,
|
||||
pendingPayloadEmpty: HomeAssistantConfig.pendingPayload === ""
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user