Converted macro to derive macro
This commit is contained in:
@@ -4,7 +4,7 @@ use automation_lib::device::{Device, LuaDeviceCreate};
|
||||
use automation_lib::event::OnMqtt;
|
||||
use automation_lib::messages::{RemoteAction, RemoteMessage};
|
||||
use automation_lib::mqtt::WrappedAsyncClient;
|
||||
use automation_macro::{LuaDeviceConfig, impl_device};
|
||||
use automation_macro::{LuaDevice, LuaDeviceConfig};
|
||||
use axum::async_trait;
|
||||
use rumqttc::{Publish, matches};
|
||||
use tracing::{debug, error, trace};
|
||||
@@ -27,11 +27,10 @@ pub struct Config {
|
||||
pub callback: ActionCallback<IkeaRemote, bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, LuaDevice)]
|
||||
pub struct IkeaRemote {
|
||||
config: Config,
|
||||
}
|
||||
impl_device!(IkeaRemote);
|
||||
|
||||
impl Device for IkeaRemote {
|
||||
fn get_id(&self) -> String {
|
||||
|
||||
Reference in New Issue
Block a user