Skip to content

useModuleTrigger is ignored #92

@karl0ss

Description

@karl0ss

Describe the bug
I am using MMM-HomeAssistantDisplay and it has an option for useModuleTrigger this means that you can set a module to only be displayed if the trigger in home assistant is set to the template value (gernerally true)

It seems that even though the trigger is false, the heading of the module is still displayed, even though the rest of the module isn't (as expected)

If i try this module without MMM-Pages, then the module is hidden completely at this time..

To Reproduce

  1. Installl MMM-Pages
  2. Install MMM-HomeAssistantDisplay
  3. Confgiure module to be displayed on specific page with a specific trigger
  4. Ensure trigger is currently false in HA

Expected behavior
Module shouldn't be displayed if the useModuleTrigger isn't "True"

Screenshots

Image

Please fill out the following information;

  • Node version: [This can be obtained by running node -v in your terminal]
  • Have you updated to the latest MagicMirror core? yes
  • Please post the relevant part of your config file here:
   {
      module: 'MMM-HomeAssistantDisplay',
      position: 'top_right',
      classes: 'page1',
      config: {
        host: "192.168.X.X",
        token: "sss",
        port: 8123,
        useTLS: false,
        title: "Bin Day",
        useModuleTigger: true,
        moduleTriggerTemplate: `{{ states.binary_sensor.put_out_rubbish.state == "on"}}`,
        moduleTriggerEntities: ["binary_sensor.put_out_rubbish"],
        class: "to-the-curb",
        sections: [{
          triggerEntities: [
            "binary_sensor.put_out_recycle",
            "binary_sensor.put_out_rubbish"
          ],
          displayTemplate: `
                {% if states.binary_sensor.put_out_rubbish.state == "on" %}<i class='mdi mdi-trash-can'></i>{% endif %}
                {% if states.binary_sensor.put_out_recycle.state == "on" %}<i class='mdi mdi-recycle'></i>{% endif %}
                `,
          class: "put-outs"
        }]
      },
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions