feat: WIP
This commit is contained in:
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user