Try setting config for dual deployment

This commit is contained in:
2024-12-17 13:32:41 +00:00
parent 32675c41bc
commit 36635224e8
7 changed files with 155 additions and 14 deletions

View File

@@ -1,7 +0,0 @@
{
"API_PREFIX": "",
"HOME_ASSISTANT_TOKEN": "",
"HOME_ASSISTANT_URL": "",
"GARAGE_DEVICE": "",
"ALARM_DEVICE": ""
}

View File

@@ -1,23 +1,21 @@
import config from './config.json';
export default class Environment {
public static getUrlPrefix(): string {
return config.API_PREFIX;
return '%API_PREFIX%';
}
public static getHomeAssistantUrl(): string {
return config.HOME_ASSISTANT_URL;
return '%HOME_ASSISTANT_URL%';
}
public static getHomeAssistantToken(): string {
return config.HOME_ASSISTANT_TOKEN;
return '%HOME_ASSISTANT_TOKEN%';
}
public static getGarageDevice(): string {
return config.GARAGE_DEVICE;
return '%GARAGE_DEVICE%';
}
public static getAlarmDevice(): string {
return config.ALARM_DEVICE;
return '%ALARM_DEVICE%';
}
}