feat: WIP
All checks were successful
Build and deploy / build (push) Successful in 10m39s
Build and deploy / Deploy container (push) Has been skipped

This commit is contained in:
2025-09-18 01:45:31 +02:00
parent b784cfed4a
commit 2763690bc0
32 changed files with 778 additions and 52 deletions

View File

@@ -15,6 +15,7 @@ use google_home::device;
use google_home::errors::ErrorCode;
use google_home::traits::OnOff;
use google_home::types::Type;
use lua_typed::Typed;
use rumqttc::{Publish, matches};
use serde::{Deserialize, Serialize};
use serde_json::json;
@@ -57,6 +58,13 @@ pub struct Config<T: OutletState> {
pub client: WrappedAsyncClient,
}
// TODO: Fix the derive macro so this is supported
impl<T: OutletState> Typed for Config<T> {
fn type_name() -> String {
"OutletConfig".into()
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, LuaSerialize)]
pub struct StateOnOff {
#[serde(deserialize_with = "state_deserializer")]