mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-22 19:53:49 +01:00
Cleanup
This commit is contained in:
parent
f4d5a70841
commit
33d9d76755
@ -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(|_| ());
|
||||
|
Loading…
Reference in New Issue
Block a user