Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrivers/gradient support #65

Merged
merged 46 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e32139d
+ Add python script that tries to extract failure samples from log f…
chrivers Jan 22, 2025
d26f3a9
* Change Group.members to use GroupMember type, instead of (accident…
chrivers Jan 22, 2025
9f6e56f
+ Added missing .description: Option<String> on Group
chrivers Jan 22, 2025
7b98567
* Use stricter parsing for Device.device_type (backed by an enum)
chrivers Jan 22, 2025
20bb2f8
* Renamed z2m types based on their names in z2m source code (without…
chrivers Jan 22, 2025
87fc96d
+ Add new optional field DeviceDefinition.icon observed in z2m source
chrivers Jan 22, 2025
ad48594
* Reorder fields in DeviceDefinition according to z2m source
chrivers Jan 22, 2025
e2865de
* Change DeviceEndpointConfiguredReporting.attribute to Value, since…
chrivers Jan 22, 2025
4ff1954
* Change DeviceEndpointConfiguredReporting.{minimum,maximum}_report_…
chrivers Jan 22, 2025
a773323
+ Make wsparse able to skip z2m action events (topics that end in "/…
chrivers Jan 22, 2025
7753acb
* Rework all the Expose* structs based on reading the z2m source. In…
chrivers Jan 22, 2025
d30f477
* Fixed issue in normalize-hue-get example: index was not incremente…
chrivers Jan 25, 2025
65ccd14
+ Add debug comments
chrivers Jan 25, 2025
deda687
+ Implement helper trait for scaling and clamping floating point val…
chrivers Jan 25, 2025
784a04e
+ Implement gamma correction code, inspired by example from Thomas L…
chrivers Jan 25, 2025
8030c41
+ Implement color space code, inspired by example from Thomas Lochma…
chrivers Jan 25, 2025
532b2ed
+ Implement helper struct for hex-encoded colors (i.e. #80C0FF)
chrivers Jan 25, 2025
28024f0
+ Add parsing support for utc timestamps with millisecond support
chrivers Jan 25, 2025
efad069
+ Implemented more color space conversion math, based on example fro…
chrivers Jan 25, 2025
8c4fd23
+ Add reverse conversion on Clamp trait
chrivers Jan 25, 2025
df81806
+ Implement .from_rgb() and .to_rgb() helpers on XY struct (assuming…
chrivers Jan 25, 2025
e9b8339
+ Add missing support for GET /clip/v2/light/:id
chrivers Jan 25, 2025
17ccb6b
* Use hue::devicedb to best-guess product_archetype, hardware_platfo…
chrivers Jan 25, 2025
989df5b
* Reversed product_name and model_id for devices. This might need so…
chrivers Jan 25, 2025
f8c1a63
* Fix order of ColorGamut::GAMUT_C (r, g, b)
chrivers Jan 25, 2025
794eea7
+ Derive Copy and PartialEq for ColorUpdate
chrivers Jan 25, 2025
4ce1118
* Make lights default to LightFunction::Decorative
chrivers Jan 25, 2025
8ea8e6c
+ Add missing LightGradientMode::RandomPixelated, and derive Default…
chrivers Jan 25, 2025
466e345
+ Add conversion helper functions for HexColor
chrivers Jan 25, 2025
85d71bc
+ Add hue data modelling for gradient lights, and gradient light upd…
chrivers Jan 25, 2025
df0f312
+ Export LightGradient from hue::api
chrivers Jan 25, 2025
6aff07d
+ Add model for z2m ExposeList
chrivers Jan 25, 2025
e872e16
+ Add detection function Device.expose_gradient()
chrivers Jan 25, 2025
a99543b
+ Add gradient support for z2m DeviceUpdate
chrivers Jan 25, 2025
35e6666
+ Implement LightGradient.extract_from_expose()
chrivers Jan 25, 2025
b714b43
+ Add helper function Light.as_gradient_opt()
chrivers Jan 25, 2025
4de3cab
+ Add gradient support for AddAssign/Sub LightUpdate on Light
chrivers Jan 25, 2025
5e7ec5e
+ Add gradient light support update support in Resources
chrivers Jan 25, 2025
108bd09
+ Implement support for accepting gradient updates in clip route han…
chrivers Jan 25, 2025
70e3250
+ Add support for detecting gradient lights in z2m backend
chrivers Jan 25, 2025
e792a2e
+ Add support for gradient lights in z2m Client::handle_update_light()
chrivers Jan 25, 2025
8a5e9d5
* Disable "const fn" in ColorSpace::mult(), to avoid incompatibility…
chrivers Jan 26, 2025
c43186a
* Formatting fix
chrivers Jan 31, 2025
eae00dd
+ Added missing docs for GradientStyle
chrivers Jan 31, 2025
6611bf8
* Suppress a clippy lint
chrivers Jan 31, 2025
76bfebc
+ Add #[must_use] to const fns
chrivers Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
+ Add gradient light support update support in Resources
  • Loading branch information
chrivers committed Feb 4, 2025
commit 5e7ec5e467b1a48f1f4a83ed2fa2a6a7d0b33bd5
3 changes: 2 additions & 1 deletion src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ impl Resources {
.with_brightness(light.dimming)
.with_on(light.on)
.with_color_temperature(light.as_mirek_opt())
.with_color_xy(light.as_color_opt());
.with_color_xy(light.as_color_opt())
.with_gradient(light.as_gradient_opt());

Ok(Some(Update::Light(upd)))
}
Expand Down