v0.14.0
This commit is contained in:
+10
-1
@@ -1,5 +1,5 @@
|
||||
use crate::models::{
|
||||
DebugSettings, HomeAssistantSettings, InfluxDbSettings, NightModeSettings,
|
||||
DebugSettings, GreeCloudSettings, HomeAssistantSettings, InfluxDbSettings, NightModeSettings,
|
||||
NotificationSettings, RuntimeSettings,
|
||||
};
|
||||
use anyhow::{Context, Result};
|
||||
@@ -100,8 +100,11 @@ impl Config {
|
||||
debug: DebugSettings {
|
||||
overlay_enabled: env_bool("GREE_CONTROLLER_DEBUG_OVERLAY").unwrap_or(false),
|
||||
gree_frames: env_bool("GREE_CONTROLLER_DEBUG_GREE_FRAMES").unwrap_or(false),
|
||||
cloud_requests: env_bool("GREE_CONTROLLER_DEBUG_CLOUD_REQUESTS").unwrap_or(false),
|
||||
cloud_mqtt: env_bool("GREE_CONTROLLER_DEBUG_CLOUD_MQTT").unwrap_or(false),
|
||||
},
|
||||
notifications: NotificationSettings::default(),
|
||||
gree_cloud: GreeCloudSettings::default(),
|
||||
night_mode: NightModeSettings {
|
||||
enabled: env_bool("GREE_CONTROLLER_NIGHT_MODE_ENABLED").unwrap_or(false),
|
||||
start_time: env::var("GREE_CONTROLLER_NIGHT_MODE_START")
|
||||
@@ -162,6 +165,12 @@ impl Config {
|
||||
if let Some(value) = env_bool("GREE_CONTROLLER_DEBUG_GREE_FRAMES") {
|
||||
settings.debug.gree_frames = value;
|
||||
}
|
||||
if let Some(value) = env_bool("GREE_CONTROLLER_DEBUG_CLOUD_REQUESTS") {
|
||||
settings.debug.cloud_requests = value;
|
||||
}
|
||||
if let Some(value) = env_bool("GREE_CONTROLLER_DEBUG_CLOUD_MQTT") {
|
||||
settings.debug.cloud_mqtt = value;
|
||||
}
|
||||
if let Some(value) = env_bool("GREE_CONTROLLER_NIGHT_MODE_ENABLED") {
|
||||
settings.night_mode.enabled = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user