Added WakeOnLAN device, some small refactoring and improved error handling

This commit is contained in:
2022-12-28 03:27:25 +01:00
parent bb18cfdcee
commit 2b4ddf82b6
8 changed files with 404 additions and 59 deletions

View File

@@ -32,7 +32,7 @@ pub struct InfoConfig {
}
#[derive(Debug, Deserialize)]
pub struct ZigbeeDeviceConfig {
pub struct MqttDeviceConfig {
pub topic: String,
}
@@ -46,9 +46,14 @@ pub struct KettleConfig {
pub enum Device {
IkeaOutlet {
info: InfoConfig,
zigbee: ZigbeeDeviceConfig,
mqtt: MqttDeviceConfig,
kettle: Option<KettleConfig>,
},
WakeOnLAN {
info: InfoConfig,
mqtt: MqttDeviceConfig,
mac_address: String,
}
}
impl Config {