MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-KitchenTimer - Touch-friendly countdown timer

    Scheduled Pinned Locked Moved Utilities
    timertouchkitchen
    33 Posts 3 Posters 1.9k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sdetweil @Niggich
      last edited by sdetweil

      @Niggich in an HA. Automation are variable to help you do want you want

      One of those is

      trigger. - what started the automation

      If you go into HA , settings, automations, pick any one,
      Look at the traces (3 dot menu). You can see the variables and values for each step of the automation

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      NiggichN 1 Reply Last reply Reply Quote 1
      • NiggichN
        Niggich @sdetweil
        last edited by

        @sdetweil Thank you. I don’t know if I’m right but this is the variable from the traces.

        this:
          entity_id: automation.timer
          state: 'on'
          attributes:
            id: '1786549333845'
            last_triggered: '2026-08-13T11:33:26.793052+00:00'
            mode: single
            current: 0
            friendly_name: MagicMirror kitchen timer started
          last_changed: '2026-08-14T20:14:37.860754+00:00'
          last_reported: '2026-08-14T20:14:37.860754+00:00'
          last_updated: '2026-08-14T20:14:37.860754+00:00'
          context:
            id: 01M00YK2S42QSK0Q9WAEN19ACF
            parent_id: null
            user_id: null
        trigger:
          id: '0'
          idx: '0'
          alias: null
          platform: mqtt
          topic: magicmirror/kitchen-timer/started
          payload: >-
            {"status":"running","remainingSeconds":60,"endsAt":1786738603487,"durationSeconds":60,"elapsedRatio":0}
          qos: 0
          description: mqtt topic magicmirror/kitchen-timer/started
          payload_json:
            status: running
            remainingSeconds: 60
            endsAt: 1786738603487
            durationSeconds: 60
            elapsedRatio: 0
        
        S 1 Reply Last reply Reply Quote 0
        • S
          sdetweil @Niggich
          last edited by sdetweil

          @Niggich so

          trigger.payload.remainingSeconds

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          NiggichN 1 Reply Last reply Reply Quote 0
          • NiggichN
            Niggich @sdetweil
            last edited by

            @sdetweil No, it is not working.

            S 1 Reply Last reply Reply Quote 0
            • S
              sdetweil @Niggich
              last edited by

              @Niggich sorry, this is case sensitive and I had lower case s, see my edit

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              NiggichN 1 Reply Last reply Reply Quote 0
              • NiggichN
                Niggich @sdetweil
                last edited by

                @sdetweil No, it’s not working. This is the automation

                alias: MagicMirror kitchen timer started
                triggers:
                  - trigger: mqtt
                    topic: magicmirror/kitchen-timer/started
                actions:
                  - action: media_player.play_media
                    target:
                      entity_id: media_player.echo_show_kuche
                    data:
                      media:
                        media_content_id: >-
                          set a timer for {{ trigger.payload.remainingSeconds | int }}
                          seconds
                        media_content_type: custom
                        metadata: {}
                
                
                S 1 Reply Last reply Reply Quote 0
                • S
                  sdetweil @Niggich
                  last edited by

                  @Niggich if you examine the traces , what error is reported?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  NiggichN 1 Reply Last reply Reply Quote 0
                  • NiggichN
                    Niggich @sdetweil
                    last edited by Niggich

                    @sdetweil sagte:

                    if you examine the traces , what error is reported?

                    This Error is shown: “Error rendering data template: UndefinedError: ‘str object’ has no attribute ‘remainingSeconds’”

                    When I change the trigger back to trigger.payload_json.remainingSeconds is no Error reported an the Echo asks for how long should be the timer.

                    The traces-Log says this.

                    params:
                      domain: media_player
                      service: play_media
                      service_data:
                        entity_id:
                          - media_player.echo_show_kuche
                        media_content_type: custom
                        media_content_id: set a timer for 60 seconds
                      target:
                        entity_id:
                          - media_player.echo_show_kuche
                    running_script: false
                    
                    S 1 Reply Last reply Reply Quote 0
                    • S
                      sdetweil @Niggich
                      last edited by

                      @Niggich ok. Good info

                      I need to test this myself, but won’t be able to til tomorrow sometime. I also need to use my echo device which is currently not used

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      NiggichN 1 Reply Last reply Reply Quote 1
                      • NiggichN
                        Niggich @sdetweil
                        last edited by Niggich

                        @sdetweil Ok, don’t worry. I’m happy you help me. Thank you!

                        EDIT:

                        I made a copy of the automation and put a custom number of seconds to trigger. The Echo still asks for how long. The I changed from seconds to minutes an the timer starts.

                        EDIT2: When I change the trigger to German language like this starte einen {{ trigger.payload_json.remainingSeconds | int }} sekunden timer the Timer starts. The only thing is that the Echo almost 4 seconds need to start the timer.

                        S 1 Reply Last reply Reply Quote 1
                        • S
                          sdetweil @Niggich
                          last edited by

                          @Niggich awesome feedback

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          NiggichN 1 Reply Last reply Reply Quote 0
                          • NiggichN
                            Niggich @sdetweil
                            last edited by

                            @sdetweil Yeah that’s great. Do you an Idea for the delay between Mirror an Echo?

                            S 1 Reply Last reply Reply Quote 0
                            • S
                              sdetweil @Niggich
                              last edited by

                              @Niggich you could subtract a fixed delay amount

                              Basic Subtraction Code
                              You can place this snippet inside a template condition, action, or template sensor. 
                              For more advanced examples, visit the official Home Assistant Templating Guide.jinja2{{ (states('sensor.first_number') | float(0)) - (states('sensor.second_number') | float(0)) }}
                              
                              Use code with caution.
                              Important Rules for TemplatesStates are text:
                               Home Assistant treats all sensor states as strings (words) by default. Adding | float forces it to act like a number.
                              
                              Prevent errors with defaults: Use float(0) instead of just float. If your sensor goes offline or shows unavailable, the 0 acts as a safety net so your automation does not crash.
                              
                              Use parentheses: Wrap each sensor and its filter in parentheses ( ) to ensure the math calculates in the correct order.
                              

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              NiggichN 1 Reply Last reply Reply Quote 1
                              • NiggichN
                                Niggich @sdetweil
                                last edited by

                                @sdetweil Sorry for the late answer. I was a bit busy. I will have a look to your Subtraction Code at the Weekend. Thanks

                                1 Reply Last reply Reply Quote 1

                                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                With your input, this post could be even better 💗

                                Register Login
                                • 1
                                • 2
                                • 2 / 2
                                • First post
                                  Last post
                                Enjoying MagicMirror? Please consider a donation!
                                MagicMirror created by Michael Teeuw.
                                Forum managed by Sam, technical setup by Karsten.
                                This forum is using NodeBB as its core | Contributors
                                Contact | Privacy Policy