Compare commits
8 Commits
203c341863
...
23b0b19693
| Author | SHA1 | Date | |
|---|---|---|---|
|
23b0b19693
|
|||
|
3bbc5d075f
|
|||
|
4d63589e0d
|
|||
|
ee6b74a91c
|
|||
|
c6353663df
|
|||
|
d8b2ff8098
|
|||
|
1233fd6105
|
|||
|
6db5831571
|
@@ -2,7 +2,6 @@ use std::fmt::Debug;
|
||||
|
||||
use automation_cast::Cast;
|
||||
use dyn_clone::DynClone;
|
||||
use google_home::traits::OnOff;
|
||||
use mlua::ObjectLike;
|
||||
|
||||
use crate::event::OnMqtt;
|
||||
@@ -18,7 +17,7 @@ pub trait LuaDeviceCreate {
|
||||
}
|
||||
|
||||
pub trait Device:
|
||||
Debug + DynClone + Sync + Send + Cast<dyn google_home::Device> + Cast<dyn OnMqtt> + Cast<dyn OnOff>
|
||||
Debug + DynClone + Sync + Send + Cast<dyn google_home::Device> + Cast<dyn OnMqtt>
|
||||
{
|
||||
fn get_id(&self) -> String;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ local on_presence = {
|
||||
local presence_system = Presence.new({
|
||||
topic = mqtt_automation("presence/+/#"),
|
||||
client = mqtt_client,
|
||||
event_channel = automation.device_manager:event_channel(),
|
||||
callback = function(_, presence)
|
||||
for _, f in ipairs(on_presence) do
|
||||
if type(f) == "function" then
|
||||
@@ -98,7 +97,6 @@ automation.device_manager:add(LightSensor.new({
|
||||
client = mqtt_client,
|
||||
min = 22000,
|
||||
max = 23500,
|
||||
event_channel = automation.device_manager:event_channel(),
|
||||
callback = function(_, light)
|
||||
for _, f in ipairs(on_light) do
|
||||
if type(f) == "function" then
|
||||
|
||||
Reference in New Issue
Block a user