Fixed spelling mistakes
Some checks failed
Build and deploy automation_rs / Build automation_rs (push) Successful in 4m30s
Build and deploy automation_rs / Build Docker image (push) Failing after 42s
Build and deploy automation_rs / Deploy Docker container (push) Has been skipped

This commit is contained in:
Dreaded_X 2024-04-29 03:45:11 +02:00
parent 528afad731
commit 0115079393
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
6 changed files with 9 additions and 9 deletions

View File

@ -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
}

View File

@ -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))
}

View File

@ -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;

View File

@ -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;
}));

View File

@ -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() {

View File

@ -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;