Skip to content

Commit

Permalink
Publish event when valve state changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lptr committed Feb 1, 2024
1 parent c24946a commit 6c71e60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/peripherals/valve/ValveComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ class ValveComponent : public Component {
// Ignore
break;
}
// TODO Publish event
mqttRoot->publish("events/state", [=](JsonObject& json) {
json["state"] = state;
});
}

PwmMotorDriver& controller;
Expand Down

0 comments on commit 6c71e60

Please sign in to comment.