From ae059aecc1b03420928d805b97c0d0218e72e5a5 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Tue, 6 Feb 2024 23:58:27 +1100 Subject: [PATCH] Doc: add comment regarding position feature usage (#111) * add comment regarding position feature usage * add doc link --- examples/cover/cover.ino | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/cover/cover.ino b/examples/cover/cover.ino index 8949a4f..96becd2 100644 --- a/examples/cover/cover.ino +++ b/examples/cover/cover.ino @@ -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) {