Implemented new timeout mechanism for ikea_outlet
All checks were successful
Build and deploy / Build application (push) Successful in 5m24s
Build and deploy / Build container (push) Successful in 1m8s
Build and deploy / Deploy container (push) Successful in 19s

This commit is contained in:
2024-12-04 03:03:53 +01:00
parent 03f1790627
commit 9d4b52b511
6 changed files with 105 additions and 52 deletions

View File

@@ -5,9 +5,9 @@ use anyhow::anyhow;
use automation::auth::User;
use automation::config::{FulfillmentConfig, MqttConfig};
use automation::device_manager::DeviceManager;
use automation::devices;
use automation::error::ApiError;
use automation::mqtt::{self, WrappedAsyncClient};
use automation::{devices, helpers};
use axum::extract::{FromRef, State};
use axum::http::StatusCode;
use axum::routing::post;
@@ -112,6 +112,7 @@ async fn app() -> anyhow::Result<()> {
lua.globals().set("automation", automation)?;
devices::register_with_lua(&lua)?;
helpers::register_with_lua(&lua)?;
// TODO: Make this not hardcoded
let config_filename = std::env::var("AUTOMATION_CONFIG").unwrap_or("./config.lua".into());