Fixed visibility of device configs
This commit is contained in:
@@ -44,22 +44,22 @@ impl From<TriggerDevicesHelper> for Vec<(WrappedDevice, bool)> {
|
||||
#[derive(Debug, Clone, LuaDeviceConfig)]
|
||||
pub struct TriggerConfig {
|
||||
#[device_config(from_lua, from(TriggerDevicesHelper))]
|
||||
devices: Vec<(WrappedDevice, bool)>,
|
||||
pub devices: Vec<(WrappedDevice, bool)>,
|
||||
#[device_config(default, with(|t: Option<_>| t.map(Duration::from_secs)))]
|
||||
pub timeout: Option<Duration>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, LuaDeviceConfig)]
|
||||
pub struct ContactSensorConfig {
|
||||
identifier: String,
|
||||
pub identifier: String,
|
||||
#[device_config(flatten)]
|
||||
mqtt: MqttDeviceConfig,
|
||||
pub mqtt: MqttDeviceConfig,
|
||||
#[device_config(from_lua)]
|
||||
presence: Option<PresenceDeviceConfig>,
|
||||
pub presence: Option<PresenceDeviceConfig>,
|
||||
#[device_config(from_lua)]
|
||||
trigger: Option<TriggerConfig>,
|
||||
pub trigger: Option<TriggerConfig>,
|
||||
#[device_config(from_lua)]
|
||||
client: WrappedAsyncClient,
|
||||
pub client: WrappedAsyncClient,
|
||||
}
|
||||
|
||||
#[derive(Debug, LuaDevice)]
|
||||
|
||||
Reference in New Issue
Block a user