The light in the bathroom will now turn off automatically after 45 min
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dreaded_X 2023-08-13 23:20:07 +02:00
parent 76a5a39ca9
commit 76b75b0cfb
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
4 changed files with 26 additions and 8 deletions

View File

@ -35,6 +35,14 @@ room = "Kitchen"
topic = "zigbee2mqtt/kitchen/kettle" topic = "zigbee2mqtt/kitchen/kettle"
timeout = 300 timeout = 300
[devices.bathroom_light]
type = "IkeaOutlet"
outlet_type = "Light"
name = "Light"
room = "Bathroom"
topic = "zigbee2mqtt/bathroom/light"
timeout = 2700
[devices.workbench_charger] [devices.workbench_charger]
type = "IkeaOutlet" type = "IkeaOutlet"
outlet_type = "Charger" outlet_type = "Charger"

View File

@ -36,6 +36,14 @@ room = "Kitchen"
topic = "zigbee2mqtt/kitchen/kettle" topic = "zigbee2mqtt/kitchen/kettle"
timeout = 5 timeout = 5
[devices.bathroom_light]
type = "IkeaOutlet"
outlet_type = "Light"
name = "Bathroom light"
room = "Bathroom"
topic = "zigbee2mqtt/bathroom/light"
timeout = 5
[devices.workbench_charger] [devices.workbench_charger]
type = "IkeaOutlet" type = "IkeaOutlet"
outlet_type = "Charger" outlet_type = "Charger"

View File

@ -6,8 +6,8 @@ pub enum Type {
Kettle, Kettle,
#[serde(rename = "action.devices.types.OUTLET")] #[serde(rename = "action.devices.types.OUTLET")]
Outlet, Outlet,
#[serde(rename = "action.devices.types.GRILL")] #[serde(rename = "action.devices.types.LIGHT")]
Grill, Light,
#[serde(rename = "action.devices.types.SCENE")] #[serde(rename = "action.devices.types.SCENE")]
Scene, Scene,
} }

View File

@ -25,6 +25,7 @@ pub enum OutletType {
Outlet, Outlet,
Kettle, Kettle,
Charger, Charger,
Light,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
@ -179,6 +180,7 @@ impl GoogleHomeDevice for IkeaOutlet {
match self.outlet_type { match self.outlet_type {
OutletType::Outlet => Type::Outlet, OutletType::Outlet => Type::Outlet,
OutletType::Kettle => Type::Kettle, OutletType::Kettle => Type::Kettle,
OutletType::Light => Type::Light, // Find a better device type for this, ideally would like to use charger, but that needs more work
OutletType::Charger => Type::Outlet, // Find a better device type for this, ideally would like to use charger, but that needs more work OutletType::Charger => Type::Outlet, // Find a better device type for this, ideally would like to use charger, but that needs more work
} }
} }