Fixed spelling mistakes
This commit is contained in:
parent
528afad731
commit
0115079393
|
@ -49,7 +49,7 @@ pub trait GoogleHomeDevice: AsGoogleHomeDevice + Sync + Send + 'static {
|
|||
fn get_id(&self) -> String;
|
||||
fn is_online(&self) -> bool;
|
||||
|
||||
// Default values that can optionally be overriden
|
||||
// Default values that can optionally be overridden
|
||||
fn will_report_state(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ pub struct GoogleHome {
|
|||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum FullfillmentError {
|
||||
pub enum FulfillmentError {
|
||||
#[error("Expected at least one ResponsePayload")]
|
||||
ExpectedOnePayload,
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ impl GoogleHome {
|
|||
&self,
|
||||
request: Request,
|
||||
devices: &HashMap<String, Arc<RwLock<Box<T>>>>,
|
||||
) -> Result<Response, FullfillmentError> {
|
||||
) -> Result<Response, FulfillmentError> {
|
||||
// TODO: What do we do if we actually get more then one thing in the input array, right now
|
||||
// we only respond to the first thing
|
||||
let intent = request.inputs.into_iter().next();
|
||||
|
@ -54,7 +54,7 @@ impl GoogleHome {
|
|||
|
||||
payload
|
||||
.await
|
||||
.ok_or(FullfillmentError::ExpectedOnePayload)
|
||||
.ok_or(FulfillmentError::ExpectedOnePayload)
|
||||
.map(|payload| Response::new(&request.request_id, payload))
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
#![feature(specialization)]
|
||||
#![feature(let_chains)]
|
||||
pub mod device;
|
||||
mod fullfillment;
|
||||
mod fulfillment;
|
||||
|
||||
mod request;
|
||||
mod response;
|
||||
|
@ -13,6 +13,6 @@ pub mod traits;
|
|||
pub mod types;
|
||||
|
||||
pub use device::GoogleHomeDevice;
|
||||
pub use fullfillment::{FullfillmentError, GoogleHome};
|
||||
pub use fulfillment::{FulfillmentError, GoogleHome};
|
||||
pub use request::Request;
|
||||
pub use response::Response;
|
||||
|
|
|
@ -233,7 +233,7 @@ impl crate::traits::Timeout for IkeaOutlet {
|
|||
tokio::time::sleep(timeout).await;
|
||||
debug!(id, "Turning outlet off!");
|
||||
// TODO: Idealy we would call self.set_on(false), however since we want to do
|
||||
// it after a timeout we have to put it in a seperate task.
|
||||
// it after a timeout we have to put it in a separate task.
|
||||
// I don't think we can really get around calling outside function
|
||||
set_on(client, &topic, false).await;
|
||||
}));
|
||||
|
|
|
@ -154,7 +154,7 @@ impl Ntfy {
|
|||
.await;
|
||||
|
||||
if let Err(err) = res {
|
||||
error!("Something went wrong while sending the notifcation: {err}");
|
||||
error!("Something went wrong while sending the notification: {err}");
|
||||
} else if let Ok(res) = res {
|
||||
let status = res.status();
|
||||
if !status.is_success() {
|
||||
|
|
|
@ -54,7 +54,7 @@ impl Device for Washer {
|
|||
}
|
||||
}
|
||||
|
||||
// The washer needs to have a power draw above the theshold multiple times before the washer is
|
||||
// The washer needs to have a power draw above the threshold multiple times before the washer is
|
||||
// actually marked as running
|
||||
// This helps prevent false positives
|
||||
const HYSTERESIS: isize = 10;
|
||||
|
|
Loading…
Reference in New Issue
Block a user