Doc: add comment regarding position feature usage (#111)

* add comment regarding position feature usage

* add doc link
This commit is contained in:
camnewnham
2024-02-06 13:58:27 +01:00
committed by GitHub
parent 6cf4f11580
commit ae059aecc1
+3 -2
View File
@@ -12,8 +12,9 @@ HAMqtt mqtt(client, device);
// "myCover" is unique ID of the cover. You should define your own ID.
HACover cover("myCover", HACover::PositionFeature);
// Cover with the position feature:
// HACover cover("myCover", HACover::PositionFeature);
// PositionFeature is optional, however required to be in a "stopped" state other than open or closed.
// If ommitted, a CommandStop will result in HA treating the cover as either Open or Closed immediately after the command.
// See https://www.home-assistant.io/integrations/cover.mqtt/
void onCoverCommand(HACover::CoverCommand cmd, HACover* sender) {
if (cmd == HACover::CommandOpen) {