diff --git a/entrypoint/src/lib.rs b/entrypoint/src/lib.rs index d902ebc..a81fb8e 100644 --- a/entrypoint/src/lib.rs +++ b/entrypoint/src/lib.rs @@ -1,24 +1,16 @@ -use std::{num::NonZeroUsize, path::PathBuf, str::FromStr, time::Duration}; +use std::{path::PathBuf, str::FromStr, time::Duration}; use clap::Parser; use driver_kasa::connection::LB130USHandle; use futures::stream::{FuturesUnordered, StreamExt}; -use home_assistant::{ - event::context::context::Context, home_assistant::HomeAssistant, light::HomeAssistantLight, - notify::service::mobile_app::StandardNotification, object_id::ObjectId, -}; -use persisted::{persisted, Config, Keyspace, Partition, PartitionCreateOptions}; -use protocol::light::{IsOff, IsOn, Kelvin, TurnToTemperature}; +use home_assistant::{home_assistant::HomeAssistant, object_id::ObjectId}; +use protocol::light::{Kelvin, TurnToTemperature}; use pyo3::prelude::*; use shadow_rs::shadow; -use tokio::{ - task::{spawn_blocking, JoinSet}, - time::{interval, MissedTickBehavior}, -}; +use tokio::time::{interval, MissedTickBehavior}; use tracing::{level_filters::LevelFilter, Level}; -use tracing_appender::rolling::{self, RollingFileAppender}; use tracing_subscriber::{ - fmt::{self, fmt, format::FmtSpan}, + fmt::{self, format::FmtSpan}, layer::SubscriberExt, registry, util::SubscriberInitExt,