Skip to content

Commit

Permalink
Make on_time optional for the L510 and L530 devices
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-dinculescu committed Feb 19, 2023
1 parent 36f551c commit 6f4d957
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ file. This change log follows the conventions of

## [Unreleased]

### Changed
- `on_time` is now optional for the `L510` and `L530` devices because the v2 hardware no longer returns it.

## [v0.3.0] - 2022-11-20

### Added
Expand Down
3 changes: 2 additions & 1 deletion src/responses/device_info_result/l510.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ pub struct L510DeviceInfoResult {
pub lang: String,
pub device_on: bool,
/// The time in seconds this device has been ON since the last state change (ON/OFF).
pub on_time: u64,
/// On v2 hardware this is always None.
pub on_time: Option<u64>,
pub overheated: bool,
pub nickname: String,
pub avatar: String,
Expand Down
3 changes: 2 additions & 1 deletion src/responses/device_info_result/l530.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ pub struct L530DeviceInfoResult {
pub lang: String,
pub device_on: bool,
/// The time in seconds this device has been ON since the last state change (ON/OFF).
pub on_time: u64,
/// On v2 hardware this is always None.
pub on_time: Option<u64>,
pub overheated: bool,
pub nickname: String,
pub avatar: String,
Expand Down

0 comments on commit 6f4d957

Please sign in to comment.