chore(driver-kasa): pub some things to reduce lower visibility warnings
This commit is contained in:
@@ -85,7 +85,7 @@ pub struct PreferredStateChoice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, SerializeDisplay, DeserializeFromStr)]
|
#[derive(Debug, SerializeDisplay, DeserializeFromStr)]
|
||||||
struct MacAddressWithoutSeparators(MacAddress);
|
pub struct MacAddressWithoutSeparators(MacAddress);
|
||||||
|
|
||||||
impl FromStr for MacAddressWithoutSeparators {
|
impl FromStr for MacAddressWithoutSeparators {
|
||||||
type Err = MacParseError;
|
type Err = MacParseError;
|
||||||
@@ -119,46 +119,46 @@ impl Display for MacAddressWithoutSeparators {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
enum ActiveMode {
|
pub enum ActiveMode {
|
||||||
#[serde(rename = "none")]
|
#[serde(rename = "none")]
|
||||||
None,
|
None,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct CtrlProtocols {
|
pub struct CtrlProtocols {
|
||||||
name: String,
|
name: String,
|
||||||
version: String,
|
version: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct DeviceId(pub String);
|
pub struct DeviceId(pub String);
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
enum DevState {
|
pub enum DevState {
|
||||||
#[serde(rename = "normal")]
|
#[serde(rename = "normal")]
|
||||||
Normal,
|
Normal,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct HardwareId(pub String);
|
pub struct HardwareId(pub String);
|
||||||
|
|
||||||
#[derive(Debug, Deserialize_repr)]
|
#[derive(Debug, Deserialize_repr)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
enum IsColor {
|
pub enum IsColor {
|
||||||
NoColor = 0,
|
NoColor = 0,
|
||||||
Color = 1,
|
Color = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize_repr)]
|
#[derive(Debug, Deserialize_repr)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
enum IsDimmable {
|
pub enum IsDimmable {
|
||||||
NotDimmable = 0,
|
NotDimmable = 0,
|
||||||
Dimmable = 1,
|
Dimmable = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize_repr)]
|
#[derive(Debug, Deserialize_repr)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
enum IsVariableColorTemp {
|
pub enum IsVariableColorTemp {
|
||||||
NoVariableColorTemp = 0,
|
NoVariableColorTemp = 0,
|
||||||
VariableColorTemp = 1,
|
VariableColorTemp = 1,
|
||||||
}
|
}
|
||||||
@@ -228,13 +228,13 @@ impl<S> FromColor<Hsv<S, f64>> for Hsb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
struct KelvinWithBrightness {
|
pub struct KelvinWithBrightness {
|
||||||
kelvin: Kelvin,
|
kelvin: Kelvin,
|
||||||
brightness: Percentage,
|
brightness: Percentage,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
enum Color {
|
pub enum Color {
|
||||||
HSB(Hsb),
|
HSB(Hsb),
|
||||||
KelvinWithBrightness(KelvinWithBrightness),
|
KelvinWithBrightness(KelvinWithBrightness),
|
||||||
}
|
}
|
||||||
@@ -343,26 +343,26 @@ pub enum LightState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
struct DftOnState {
|
pub struct DftOnState {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
color: Color,
|
color: Color,
|
||||||
mode: LightStateMode,
|
mode: LightStateMode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
enum LightStateMode {
|
pub enum LightStateMode {
|
||||||
#[serde(rename = "normal")]
|
#[serde(rename = "normal")]
|
||||||
Normal,
|
Normal,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
enum MicType {
|
pub enum MicType {
|
||||||
#[serde(rename = "IOT.SMARTBULB")]
|
#[serde(rename = "IOT.SMARTBULB")]
|
||||||
IotSmartbulb,
|
IotSmartbulb,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
struct OemId(pub String);
|
pub struct OemId(pub String);
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
pub struct SetLightStateArgs {
|
pub struct SetLightStateArgs {
|
||||||
|
|||||||
Reference in New Issue
Block a user