A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • 2 Votes
    32 Posts
    1k Views
    S
    @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.
  • World Cup page

    Unsolved Requests
    5
    1 Votes
    5 Posts
    2k Views
    S
    @fnf Thanks for sharing these options. The dedicated MMM-WorldCup2026 module looks like the cleanest solution here compared to using a generic webview wrapper.
  • PIR / MQTT - Presence sensor(s) revived

    System
    41
    5 Votes
    41 Posts
    10k Views
    R
    Good evening to all. Today was an interesting day - caused by an issue posted by Stefano ( papinist ) He opened issue # 10 . with a friendly, well-argued suggestion: expose the mirror screen to Home Assistant as a proper switch — something you can both see (is the screen on?) and control (turn it on/off) as a native HA entity. The nice realisation while designing it was that this needs almost nothing new. PSC already speaks MQTT — it already subscribes to a presence topic so that MQTT occupancy sensors can drive the screen. So Home Assistant is simply another presence source, exactly like a radar or mmWave sensor publishing occupancy. The only piece genuinely missing was the reverse direction: a topic the mirror writes, carrying its own screen state. No extra module, no shell scripts, no IPC — just publish one more thing and let HA subscribe to it. The design The result is an optional homeAssistant config block. Enable it and PSC opens a dedicated MQTT connection (independent of mode, so it works even in pure PIR setups), reusing the broker and credentials you already configured: homeAssistant: { enabled: false, // opt-in, default off → no surprise discovery: true, // publish the HA auto-discovery config discoveryPrefix: "homeassistant",// must match your HA MQTT discovery prefix objectId: "magicmirror_screen", // technical id → topic paths + HA unique_id name: "MagicMirror Screen" // friendly name shown in HA } A few decisions worth flagging, because each is a small opinion: It’s a switch, not a button — so ON latches. ON sets a held presence signal: the screen stays on for as long as the switch is on. OFF releases it, and the mirror returns to standby through your normal counterTimeout — the same graceful countdown a PIR walk-away uses. There’s deliberately no separate “instant off”; if you want a snappy off, lower counterTimeout. It never reaches into the module’s own logic. The integration adds exactly one OR-term to the presence evaluation — haPresence alongside the existing PIR / MQTT / touch sources — and it sits below the cron windows in precedence. The scheduler still wins: an ON during a cronIgnoreWindows is swallowed, an OFF during a cronAlwaysOnWindows is overridden. Timer, dimming and window logic are untouched. The switch is a strict mirror of the real screen. The state topic always publishes the actual screen state, whatever caused the change — PIR, schedule, touch or HA — and it re-publishes after every command. So when the schedule rejects or overrides a command, the switch snaps back to reality rather than lying: HA can never show “on” while the screen is off, or vice versa. A command is a request; the fact is whatever the mirror actually does. Auto-discovery + availability, so setup is effortless. On connect PSC publishes a retained Home Assistant MQTT-Discovery config and an availability topic backed by a Last-Will. HA creates the entity automatically and marks it unavailable if the mirror drops off the broker. The topics, all derived from objectId: homeassistant/switch/magicmirror_screen/config (retained) → discovery magicmirror/magicmirror_screen/set → command (HA → mirror: ON/OFF) magicmirror/magicmirror_screen/state (retained) → state (mirror → HA: ON/OFF) magicmirror/magicmirror_screen/availability (retained) → online/offline (LWT) How the auto-creation works The mirror and Home Assistant never talk to each other directly — the broker is the only meeting point, and the discoveryPrefix (homeassistant) is the agreed channel. HA’s MQTT integration subscribes to homeassistant/# and listens for anyone announcing themselves there. Because our config is published retained, the broker hands it to HA the instant HA connects — even if HA boots hours later. HA reads the topic path plus the JSON body and builds switch.magicmirror_screen, wired to the command/state/availability topics. It’s the same mechanism Tasmota, Zigbee2MQTT and ESPHome use — the mirror just follows the convention, so it’s picked up like any other device. An example automation (doorbell → wake → graceful standby) automation: - alias: "Doorbell wakes the MagicMirror" trigger: - platform: state entity_id: binary_sensor.video_doorbell to: "on" action: - service: switch.turn_on target: { entity_id: switch.magicmirror_screen } - delay: "00:00:30" # keep the camera visible while you look - service: switch.turn_off target: { entity_id: switch.magicmirror_screen } Turn it on when the doorbell rings, keep it visible for half a minute, then hand back to PSC’s timer for the standby — or drop the delay/off and turn it off from another trigger, whatever fits your flow. A note on testing I don’t run Home Assistant here, so I verified the whole MQTT surface with MQTT Explorer playing HA’s role — publishing ON/OFF to the command topic and watching the discovery, state and availability topics. The entire round-trip is observable that way: ON holds, OFF starts the countdown, the state tracks the real screen (including snapping back when the schedule overrides a command), the discovery config is well-formed, availability goes online on start. The one thing that needs a real instance — does HA actually auto-create the entity from that config — is being confirmed by papinist, who has the setup for it. Update / install If you’re already on the module: cd ~/MagicMirror/modules/MMM-PresenceScreenControl git pull No dependency changes this time, so no npm install is needed — just restart MagicMirror. Everything is backwards-compatible and opt-in: homeAssistant.enabled defaults to false, and the rest is additive, so an update touches nothing in your existing setup until you switch it on. A genuine thank-you to papinist for the friendly, well-reasoned suggestion and the pleasantconversation that shaped it. Exactly the kind of exchange that makes maintaining a module worthwhile. Hope you find it useful. Warmest regards, Ralf
  • 1 Votes
    5 Posts
    110 Views
    R
    @KristjanESPERANTO , Ahh… OK. Seems acceptable to me (I’m not a friend of “getting all” - but in this special case…). Have switched to “all activities” for all important public modules. Thanks again for your hint and kind guidance! Ralf
  • MMM-PublicTransportHafas

    Bug Hunt
    4
    0 Votes
    4 Posts
    148 Views
    KristjanESPERANTOK
    I have the impression that there are fewer and fewer working HAFAS providers - which is why MMM-PublicTransportHub is, in a way, more future-oriented, since it supports more than just HAFAS. I don’t have any experience with your region. So I recommend give MMM-PublicTransportHub with Transitous a try :)
  • 0 Votes
    3 Posts
    1k Views
    S
    Thanks for sharing Brigla Shop. Does their glass have high light transmission and reflection suitable for a MagicMirror setup?
  • MMM-GooglePhotos

    General Discussion
    6
    0 Votes
    6 Posts
    191 Views
    S
    @Rberry91 I do not know. I have not tested it. But others have reported it doesn’t work
  • MMM-Flights

    Transport
    53
    3 Votes
    53 Posts
    32k Views
    karsten13K
    @philpburns72 said: if there is a way to limit the number of results this returns? This feature doesn’t exist at the moment. However, I’ve noticed myself that during peak times, the list can get so long that it scrolls off the bottom of the screen. The question is how to implement such a filter. One idea would be a maxPlanes property that displays only the n aircraft closest to your own position (both on the map and in the list). But perhaps you have a better suggestion?
  • Strava weekinbike & lastactivitymap

    Unsolved Troubleshooting
    5
    0 Votes
    5 Posts
    175 Views
    T
    @malvinas I have updated the README files in the repos to detail how the token file gets created and stored. You shouldn’t have to do anything for it’s creation, you should just need to make sure your module config has valid values and the file will get generated automatically. I hope this helps.
  • FYI - Zero 2W is now pretty much useless but a 3B+ works fine

    Unsolved Troubleshooting
    5
    1 Votes
    5 Posts
    248 Views
    W
    @Eli In my case, some modules that I use stopped working on the previous version of MM, so I had no choice but to upgrade. There are likely other modules that have similar requirements. If that wasn’t the case I would have happily kept the older version. I don’t regret my decision as the 3B+ is much faster when it comes to booting up and starting, stopping, or restarting MM.
  • Snilles Magic Mirror Project

    Show your Mirror
    46
    15 Votes
    46 Posts
    73k Views
    H
    @Snille Hi there! I’d love to take you up on your offer to see the Node-RED flow. Having a concrete reference would be super helpful as a starting point for my setup! Thanks again for the great write-up! 🙂
  • More weeks using MMM-MonthlyCalendar?

    Unsolved Troubleshooting
    7
    0 Votes
    7 Posts
    257 Views
    S
    @LaeHarr as a separate topic on CSS. many times the exact mechanism isn’t documented or clear as MM is built on a web browser, all the browser CSS approaches work, if you can figure them out!.. to that end, the browser provides a development environment where you can review and test setting styles on the content see the second link in my signature below for a starter use on that.
  • NFL games not showing up?

    Sport
    3
    0 Votes
    3 Posts
    4k Views
    R
    @lucallmon said: NFL not showing up. Everything else does. NFL does not. Any idea why? I had the same issue before. Make sure you’re using the fork from @dathbe, otherwise NFL data won’t load. Run git remote -v in the module folder to check which repo you’re on.
  • MMM-xiaomi - Temperature and Humidity from your smarthome

    Utilities
    142
    2 Votes
    142 Posts
    235k Views
    R
    Yes, the module still works if you use a Xiaomi BLE gateway. The easiest option is the official Xiaomi Bluetooth Gateway (Mi Smart Home Hub). Once paired, the sensor data shows up fine in MM.
  • Seymour — my modern take on the 3Com Audrey

    Show your Mirror
    6
    3 Votes
    6 Posts
    374 Views
    B
    BTW MMM-WeatherHero is a great module for this. It looks right at home. [image: 1786644793627-8fc94368-ebaa-4459-92e5-0601d10a8eff-image.jpeg]
  • Calendar dates wrong on all day events

    Solved Troubleshooting
    3
    0 Votes
    3 Posts
    160 Views
    R
    Found the fix, modified the compose.yaml to use local timezone. Thanks Sam.
  • Unifi doorbell video shown on MM when bell rung

    Show your Mirror
    6
    3 Votes
    6 Posts
    3k Views
    B
    I did something similar with my Reolink doorbell, but used Home Assistant as the middleman. When motion is detected, Home Assistant grabs a snapshot and sends it to MagicMirror. I use MMM-MessageCenter to display the notification and keep the snapshot in the message history, so I can still see who was at the door afterward. [image: 1786470806528-8bc1bd39-c9be-42ff-bad6-c864b697f8e5-image-resized.jpeg] I went with snapshots rather than live video since it is lightweight and, for my use, I mostly just wanted to see who came to the door.
  • MMM-MyCommute - hide days has no effect

    Unsolved Troubleshooting
    1
    0 Votes
    1 Posts
    94 Views
    P
    Hi. I am a great fan of the MMM-MyCommute module, but for some unknown reason it has stopped showing up. I have narrowed it down to the hideDays parameter. If I comment this parameter, the module shows up. Once I reactivate it, nothing shows up. The logs do not show any errors, as the module is working - just not as intended. As usual, I want to hide this module on the weekend hideDays: [0,6], Any idear/clue/tip what is going on here ? Thanks
  • Default weather ignoring fade false ?

    Solved Troubleshooting
    4
    0 Votes
    4 Posts
    188 Views
    S
    @msimon360 glad you got it. One other thing, forum related, if you paste stuff with quotes, " or ’ , and its NOT in a code block, the content is considered text like in a word processor, and the quote marks are word processor quotes (slanted, curved) … this is WRONG for javascript… it needs TEXT quote marks. vertical " or ' (If someone copies the non-codeblock content, they will get the curved quotes, see my content in the post above… ) anyone trying to USE that will get errors… SO, please use code block for any config info (it will also save your indentation). (and debug log info) open the message editor, paste the text, with a blank line above and below select the text you just pasted, and click the code block button in the editor ribbon bar, </>
  • Github usage and module continuations

    Pinned General Discussion
    11
    2 Votes
    11 Posts
    7k Views
    KristjanESPERANTOK
    @Tigershroffr Good points. Feel free to suggest specific improvements to the documentation or the module checks (here is the result list) 😃 Some developers really pay attention to the suggestions. Others ignore them, but that’s fine too. We definitely want to encourage non-programmers to write their own modules.