From 33d9d76755201871875c2bf2f409a01fb9e7619d Mon Sep 17 00:00:00 2001 From: Gregor Reitzenstein Date: Thu, 17 Sep 2020 15:47:41 +0200 Subject: [PATCH] Cleanup --- src/modules/shelly.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/shelly.rs b/src/modules/shelly.rs index 5cb4640..4dc1d11 100644 --- a/src/modules/shelly.rs +++ b/src/modules/shelly.rs @@ -63,9 +63,8 @@ impl Stream for Shelly { if let Some(status) = ready!(Signal::poll_change(Pin::new(s), cx)) { let topic = format!("shellies/{}/relay/0/command", unpin.name); let pl = match status { - Status::Free => "off", + Status::Free | Status::Blocked => "off", Status::Occupied => "on", - Status::Blocked => "off", }; let msg = mqtt::Message::new(topic, pl, 0); let f = unpin.client.publish(msg).map(|_| ());