first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 22:29:38 +03:00
commit 427856cd3a
176 changed files with 27613 additions and 0 deletions

27
examples/hz-make.rs Normal file
View File

@@ -0,0 +1,27 @@
use hue::api::ColorGamut;
use hue::zigbee::{GradientParams, GradientStyle, HueZigbeeUpdate};
use bifrost::error::ApiResult;
fn main() -> ApiResult<()> {
pretty_env_logger::formatted_builder()
.filter_level(log::LevelFilter::Debug)
.parse_default_env()
.init();
let hz = HueZigbeeUpdate::new()
.with_on_off(true)
.with_brightness(0x20)
.with_gradient_colors(
GradientStyle::Linear,
vec![ColorGamut::GAMUT_C.red, ColorGamut::GAMUT_C.red],
)?
.with_gradient_params(GradientParams {
scale: 0x38,
offset: 0x00,
});
println!("{}", hex::encode(&hz.to_vec()?));
Ok(())
}