Added brightness trait

This commit is contained in:
2024-12-08 05:19:27 +01:00
parent 41d2af655b
commit 8c9e93dcc4
2 changed files with 25 additions and 0 deletions

View File

@@ -14,6 +14,11 @@ traits! {
async fn on(&self) -> Result<bool, ErrorCode>,
"action.devices.commands.OnOff" => async fn set_on(&self, on: bool) -> Result<(), ErrorCode>,
},
"action.devices.traits.Brightness" => trait Brightness {
command_only_brightness: Option<bool>,
async fn brightness(&self) -> Result<u8, ErrorCode>,
"action.devices.commands.BrightnessAbsolute" => async fn set_brightness(&self, brightness: u8) -> Result<(), ErrorCode>,
},
"action.devices.traits.Scene" => trait Scene {
scene_reversible: Option<bool>,