@companion-module/base
    Preparing search index...

    Interface CompanionBooleanFeedbackDefinition

    The definition of a boolean feedback

    interface CompanionBooleanFeedbackDefinition {
        callback: (
            feedback: CompanionFeedbackInfo,
            context: CompanionCommonCallbackContext,
        ) => boolean | Promise<boolean>;
        defaultStyle: Partial<CompanionFeedbackButtonStyleResult>;
        description?: string;
        learn?: (
            action: CompanionFeedbackInfo,
            context: CompanionCommonCallbackContext,
        ) =>
            | CompanionOptionValues
            | Promise<CompanionOptionValues | undefined>
            | undefined;
        learnTimeout?: number;
        name: string;
        options: SomeCompanionFeedbackInputField[];
        showInvert?: boolean;
        subscribe?: (
            feedback: CompanionFeedbackInfo,
            context: CompanionCommonCallbackContext,
        ) => void | Promise<void>;
        type: "boolean";
        unsubscribe?: (
            feedback: CompanionFeedbackInfo,
            context: CompanionCommonCallbackContext,
        ) => void | Promise<void>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    callback: (
        feedback: CompanionFeedbackInfo,
        context: CompanionCommonCallbackContext,
    ) => boolean | Promise<boolean>

    Called to get the feedback value

    defaultStyle: Partial<CompanionFeedbackButtonStyleResult>

    The default style properties for this feedback

    description?: string

    Additional description of the feedback

    learn?: (
        action: CompanionFeedbackInfo,
        context: CompanionCommonCallbackContext,
    ) =>
        | CompanionOptionValues
        | Promise<CompanionOptionValues | undefined>
        | undefined

    The user requested to 'learn' the values for this feedback.

    learnTimeout?: number

    Timeout for the 'learn' function (in milliseconds) Companion sets a default value of 5s, to ensure that the learn does not get stuck never completing You can change this if this number does not work for you, but you should keep it to a sensible value

    name: string

    Name to show in the feedbacks list

    The input fields for the feedback

    showInvert?: boolean

    If undefined or true, Companion will add an 'Inverted' checkbox for your feedback, and handle the logic for you. By setting this to false, you can disable this for your feedback. You should do this if it does not make sense for your feedback.

    subscribe?: (
        feedback: CompanionFeedbackInfo,
        context: CompanionCommonCallbackContext,
    ) => void | Promise<void>

    Called to report the existence of a feedback. Useful to ensure necessary data is loaded

    type: "boolean"

    The type of the feedback

    unsubscribe?: (
        feedback: CompanionFeedbackInfo,
        context: CompanionCommonCallbackContext,
    ) => void | Promise<void>

    Called to report an feedback has been edited/removed. Useful to cleanup subscriptions setup in subscribe