feat: Receive devices through config return

This commit is contained in:
2025-10-17 03:45:11 +02:00
parent 0c80cef5a1
commit 948380ea9b
7 changed files with 66 additions and 42 deletions

View File

@@ -2,6 +2,7 @@ use std::fmt::Debug;
use automation_cast::Cast;
use dyn_clone::DynClone;
use lua_typed::Typed;
use mlua::ObjectLike;
use crate::event::OnMqtt;
@@ -41,4 +42,10 @@ impl mlua::FromLua for Box<dyn Device> {
}
impl mlua::UserData for Box<dyn Device> {}
impl Typed for Box<dyn Device> {
fn type_name() -> String {
"DeviceInterface".into()
}
}
dyn_clone::clone_trait_object!(Device);