Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-dinculescu committed Nov 25, 2023
1 parent 81dde27 commit f1ea855
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tapo/examples/tapo_ke100.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let device_info = device.get_device_info().await?;
info!("Device info: {device_info:?}");

// Set temperature on target device and set temperature unit to Celsius.
// Set target temperature.
// KE100 currently only supports Celsius as temperature unit.
info!("Setting target temperature to {target_temperature} degrees Celsius...");
device
Expand Down
1 change: 0 additions & 1 deletion tapo/src/api/child_devices/ke100_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ impl<'h> KE100Handler<'h> {
target_temperature: u8,
temperature_unit: TemperatureUnitKE100,
) -> Result<(), Error> {
//let control_range = self.get_control_range().await?;
let device_info = self.get_device_info().await?;

if target_temperature < device_info.min_control_temperature
Expand Down
4 changes: 2 additions & 2 deletions tapo/src/api/child_devices/t31x_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ impl<'h> T31XHandler<'h> {
.hub_handler
.control_child::<TemperatureHumidityRecordsRaw>(self.device_id.clone(), request)
.await?
.ok_or_else(|| Error::Tapo(TapoResponseError::EmptyResult));
.ok_or_else(|| Error::Tapo(TapoResponseError::EmptyResult))?;

Ok(result?.try_into()?)
Ok(result.try_into()?)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub enum TemperatureUnitKE100 {
Celsius,
}

/// KE100 TRV.
/// KE100 thermostatic radiator valve (TRV).
///
/// Specific properties: `temperature_unit`, `current_temperature`, `target_temperature`,
/// `min_control_temperature, `max_control_temperature`, `temperature_offset`,
Expand Down

0 comments on commit f1ea855

Please sign in to comment.