Made the impl_device macro more explicit about the implemented traits

This also converts impl_device into a procedural macro and get rid of a
lot of "magic" that was happening.
This commit is contained in:
2025-08-28 03:02:45 +02:00
parent c5262dcf35
commit d2b01123b8
26 changed files with 197 additions and 208 deletions

View File

@@ -4,7 +4,7 @@ use std::net::SocketAddr;
use async_trait::async_trait;
use automation_lib::device::{Device, LuaDeviceCreate};
use automation_lib::event::{OnDarkness, OnPresence};
use automation_macro::LuaDeviceConfig;
use automation_macro::{LuaDeviceConfig, impl_device};
use serde::{Deserialize, Serialize};
use tracing::{error, trace, warn};
@@ -33,6 +33,7 @@ pub struct Config {
pub struct HueBridge {
config: Config,
}
impl_device!(HueBridge);
#[derive(Debug, Serialize)]
struct FlagMessage {