feat(config)!: Move device_manager out of global automation table into separate module
Moved `automation.device_manager` into a separate module called `device_manager`
This commit is contained in:
@@ -130,9 +130,10 @@ async fn app() -> anyhow::Result<()> {
|
||||
})?;
|
||||
|
||||
automation.set("new_mqtt_client", new_mqtt_client)?;
|
||||
automation.set("device_manager", device_manager.clone())?;
|
||||
lua.globals().set("automation", automation)?;
|
||||
|
||||
lua.register_module("device_manager", device_manager.clone())?;
|
||||
|
||||
let utils = lua.create_table()?;
|
||||
let get_env = lua.create_function(|_lua, name: String| {
|
||||
std::env::var(name).map_err(mlua::ExternalError::into_lua_err)
|
||||
|
||||
Reference in New Issue
Block a user