Added basic hue light bridge, improved Timeout trait and setup frontdoor to turn on hallway ligh temporarily
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-08-15 04:45:35 +02:00
parent c584fa014c
commit bb131f2b1a
8 changed files with 211 additions and 20 deletions

View File

@@ -201,8 +201,9 @@ impl OnMqtt for ContactSensor {
if lights.timeout.is_zero() && let Some(light) = As::<dyn OnOff>::cast_mut(light.as_mut()) {
light.set_on(false).await.ok();
} else if let Some(light) = As::<dyn Timeout>::cast_mut(light.as_mut()) {
light.start_timeout(lights.timeout);
light.start_timeout(lights.timeout).await;
}
// TODO: Put a warning/error on creation if either of this has to option to fail
}
}
}