Moved quasi-devices into the devices module and made event related device traits part of the event module
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-24 04:28:17 +02:00
parent 28ce9c9d82
commit 40c0ac5144
15 changed files with 64 additions and 66 deletions

View File

@@ -8,12 +8,12 @@ use tracing::{debug, error, trace, warn};
use crate::{
config::{CreateDevice, MqttDeviceConfig},
devices::DEFAULT_PRESENCE,
error::{CreateDeviceError, MissingWildcard},
event::EventChannel,
event::OnMqtt,
event::OnPresence,
messages::{ContactMessage, PresenceMessage},
presence,
traits::OnMqtt,
traits::OnPresence,
};
use super::Device;
@@ -94,7 +94,7 @@ impl CreateDevice for ContactSensor {
mqtt: config.mqtt,
presence,
client: client.clone(),
overall_presence: presence::DEFAULT,
overall_presence: DEFAULT_PRESENCE,
is_closed: true,
handle: None,
})