Removed old darkness system
All checks were successful
Build and deploy / build (push) Successful in 8m56s
Build and deploy / Deploy container (push) Successful in 38s

This commit is contained in:
2025-08-31 05:40:28 +02:00
parent aa730c9738
commit 3af618e40f
5 changed files with 3 additions and 61 deletions

View File

@@ -4,7 +4,7 @@ use async_trait::async_trait;
use automation_lib::action_callback::ActionCallback;
use automation_lib::config::MqttDeviceConfig;
use automation_lib::device::{Device, LuaDeviceCreate};
use automation_lib::event::{self, Event, EventChannel, OnMqtt};
use automation_lib::event::{self, EventChannel, OnMqtt};
use automation_lib::messages::BrightnessMessage;
use automation_lib::mqtt::WrappedAsyncClient;
use automation_macro::{LuaDevice, LuaDeviceConfig};
@@ -114,10 +114,6 @@ impl OnMqtt for LightSensor {
debug!("Dark state has changed: {is_dark}");
self.state_mut().await.is_dark = is_dark;
if self.config.tx.send(Event::Darkness(is_dark)).await.is_err() {
warn!("There are no receivers on the event channel");
}
self.config
.callback
.call(self, &!self.state().await.is_dark)