Report AirFilter humidity
This commit is contained in:
@@ -11,6 +11,8 @@ pub enum Trait {
|
||||
Scene,
|
||||
#[serde(rename = "action.devices.traits.FanSpeed")]
|
||||
FanSpeed,
|
||||
#[serde(rename = "action.devices.traits.HumiditySetting")]
|
||||
HumiditySetting,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
@@ -72,3 +74,14 @@ pub trait FanSpeed {
|
||||
async fn current_speed(&self) -> String;
|
||||
async fn set_speed(&self, speed: &str) -> Result<(), ErrorCode>;
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
#[impl_cast::device_trait]
|
||||
pub trait HumiditySetting {
|
||||
// TODO: This implementation is not complete, I have only implemented what I need right now
|
||||
fn query_only_humidity_setting(&self) -> Option<bool> {
|
||||
None
|
||||
}
|
||||
|
||||
async fn humidity_ambient_percent(&self) -> isize;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user