Handle turning off devices when away through lua
This commit is contained in:
@@ -3,7 +3,6 @@ use std::net::SocketAddr;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use automation_lib::device::{Device, LuaDeviceCreate};
|
||||
use automation_lib::event::OnPresence;
|
||||
use automation_lib::lua::traits::AddAdditionalMethods;
|
||||
use automation_macro::{LuaDevice, LuaDeviceConfig};
|
||||
use mlua::LuaSerdeExt;
|
||||
@@ -110,11 +109,3 @@ impl AddAdditionalMethods for HueBridge {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl OnPresence for HueBridge {
|
||||
async fn on_presence(&self, presence: bool) {
|
||||
trace!("Bridging presence to hue");
|
||||
self.set_flag(Flag::Presence, presence).await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user