mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-26 00:24:55 +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)) {
|
if let Some(status) = ready!(Signal::poll_change(Pin::new(s), cx)) {
|
||||||
let topic = format!("shellies/{}/relay/0/command", unpin.name);
|
let topic = format!("shellies/{}/relay/0/command", unpin.name);
|
||||||
let pl = match status {
|
let pl = match status {
|
||||||
Status::Free => "off",
|
Status::Free | Status::Blocked => "off",
|
||||||
Status::Occupied => "on",
|
Status::Occupied => "on",
|
||||||
Status::Blocked => "off",
|
|
||||||
};
|
};
|
||||||
let msg = mqtt::Message::new(topic, pl, 0);
|
let msg = mqtt::Message::new(topic, pl, 0);
|
||||||
let f = unpin.client.publish(msg).map(|_| ());
|
let f = unpin.client.publish(msg).map(|_| ());
|
||||||
|
Loading…
Reference in New Issue
Block a user