Added trash light automation
This commit is contained in:
parent
3b8f15eb88
commit
006320be18
|
@ -166,6 +166,15 @@ automation.device_manager:add(ContactSensor.new({
|
|||
},
|
||||
}))
|
||||
|
||||
automation.device_manager:add(ContactSensor.new({
|
||||
identifier = "hallway_trash",
|
||||
topic = mqtt_z2m("hallway/trash"),
|
||||
client = mqtt_client,
|
||||
trigger = {
|
||||
devices = { hallway_lights },
|
||||
},
|
||||
}))
|
||||
|
||||
local bedroom_air_filter = AirFilter.new({
|
||||
name = "Air Filter",
|
||||
room = "Bedroom",
|
||||
|
|
|
@ -54,7 +54,7 @@ pub struct ContactSensorConfig {
|
|||
pub identifier: String,
|
||||
#[device_config(flatten)]
|
||||
pub mqtt: MqttDeviceConfig,
|
||||
#[device_config(from_lua)]
|
||||
#[device_config(from_lua, default)]
|
||||
pub presence: Option<PresenceDeviceConfig>,
|
||||
#[device_config(from_lua)]
|
||||
pub trigger: Option<TriggerConfig>,
|
||||
|
|
Loading…
Reference in New Issue
Block a user