v0.8.14
This commit is contained in:
1 parent
3e950ab5fa
commit
5c05eddb8f
83 files changed
+10130
-9954
No files matched your search
@@ -0,0 +1,61 @@
|
||||
fn public_settings(settings: &RuntimeSettings) -> Value {
|
||||
json!({
|
||||
"controller_id": settings.controller_id,
|
||||
"simulator_enabled": settings.simulator_enabled,
|
||||
"poll_interval_seconds": settings.poll_interval_seconds,
|
||||
"zone_interval_seconds": settings.zone_interval_seconds,
|
||||
"discovery_timeout_ms": settings.discovery_timeout_ms,
|
||||
"discovery_broadcast": settings.discovery_broadcast,
|
||||
"house_mode": settings.house_mode,
|
||||
"house_power_enabled": settings.house_power_enabled,
|
||||
"control_strategy": settings.control_strategy,
|
||||
"outdoor_assist_enabled": settings.outdoor_assist_enabled,
|
||||
"history_retention_days": settings.history_retention_days,
|
||||
"history_compaction_enabled": settings.history_compaction_enabled,
|
||||
"event_log_retention_days": settings.event_log_retention_days,
|
||||
"suppress_device_beep": settings.suppress_device_beep,
|
||||
"debug": settings.debug,
|
||||
"night_mode": settings.night_mode,
|
||||
"notifications": {
|
||||
"enabled": settings.notifications.enabled,
|
||||
"mode": settings.notifications.mode,
|
||||
"provider": settings.notifications.provider,
|
||||
"pushover_app_token": "",
|
||||
"pushover_user_key": "",
|
||||
"pushover_configured": !settings.notifications.pushover_app_token.trim().is_empty() && !settings.notifications.pushover_user_key.trim().is_empty(),
|
||||
"slack_webhook_url": "",
|
||||
"slack_configured": !settings.notifications.slack_webhook_url.trim().is_empty(),
|
||||
"discord_webhook_url": "",
|
||||
"discord_configured": !settings.notifications.discord_webhook_url.trim().is_empty(),
|
||||
"cooldown_seconds": settings.notifications.cooldown_seconds,
|
||||
"communication_failure_threshold": settings.notifications.communication_failure_threshold,
|
||||
"target_timeout_minutes": settings.notifications.target_timeout_minutes,
|
||||
"alert_types": &settings.notifications.alert_types,
|
||||
},
|
||||
"influxdb": {
|
||||
"enabled": settings.influxdb.enabled,
|
||||
"version": settings.influxdb.version,
|
||||
"url": settings.influxdb.url,
|
||||
"database": settings.influxdb.database,
|
||||
"username": settings.influxdb.username,
|
||||
"password": "",
|
||||
"password_configured": !settings.influxdb.password.trim().is_empty(),
|
||||
"org": settings.influxdb.org,
|
||||
"bucket": settings.influxdb.bucket,
|
||||
"token": "",
|
||||
"token_configured": !settings.influxdb.token.trim().is_empty(),
|
||||
"history_threshold_days": settings.influxdb.history_threshold_days,
|
||||
},
|
||||
"home_assistant": {
|
||||
"url": settings.home_assistant.url,
|
||||
"token": "",
|
||||
"token_configured": !settings.home_assistant.token.trim().is_empty(),
|
||||
"default_entity_id": settings.home_assistant.default_entity_id,
|
||||
"outdoor_entity_id": settings.home_assistant.outdoor_entity_id,
|
||||
"sensor_stale_after_seconds": settings.home_assistant.sensor_stale_after_seconds,
|
||||
"allow_invalid_tls": settings.home_assistant.allow_invalid_tls,
|
||||
"sensor_aliases": settings.home_assistant.sensor_aliases,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user