Show a Home Assistant sensor in your Mac menu bar

Home Assistant already knows the temperature in every room, what the solar panels are making and how charged the car is. Its REST API hands any entity’s state to a Script meter, so the number you check most sits in the menu bar instead of a browser tab.

It works for anything with a numeric state, and for attributes and templates when the number lives elsewhere.

Recipe tested October 29, 2026 with Multimeter 1.1. Source: Script.

Preview: the Thermometer face and two alternatives, with sample values like the ones this recipe returns.

What you need

  • Multimeter for macOS 13 or later, $19.99 once.
  • The direct download version of Multimeter from this site (the Script source isn’t in the Mac App Store version).
  • Home Assistant reachable from your Mac, like http://homeassistant.local:8123.
  • A long-lived access token: in Home Assistant, open your profile, then Security, then Create token under Long-lived access tokens.

Set it up

  1. Save the token in your login Keychain, so it never sits in the command or a file. Run this in Terminal; it asks for the value and hides what you type.
    Terminal (once)
    security add-generic-password -U -a "$USER" -s home-assistant -w
  2. Find the entity id in Settings, Devices & services, Entities (for example sensor.living_room_temperature). Then check it in Terminal:
    Command
    curl -s -m 5 -H "Authorization: Bearer $(security find-generic-password -s home-assistant -w)" http://homeassistant.local:8123/api/states/sensor.living_room_temperature
  3. Add a Script meter with the command, your address and your entity id, and set the key path to state.
  4. Refresh every 30 seconds or 1 minute, and set the range and unit for the sensor (for example 50 to 90, unit °F).

Multimeter settings

In Customize This Meter… (from the meter’s menu):

Settings for this meter
SettingValue
SourceScript
Commandthe curl line above, with your entity
Key pathstate
Refresh every30 seconds
Rangefits the sensor, like 50 to 90
Unitlike °F, W or %
Alertsas you like, for example High values at 78 and 82
FaceThermometer for temperatures, Arc Gauge for power, Level Bar for a battery level

Tested: Run on October 29, 2026 against Home Assistant 2026.10.4 in Docker: state returned 71.6 for a temperature sensor, an attribute path returned the sun’s elevation (16.76), and the template call below returned 0. Each call took about 0.2 seconds.

Script meters need the direct download version of Multimeter from this site, which is the one on sale now. How commands run, the PATH they see and the 10 second limit are in the Script meters guide.

Limits

  • The token can do anything your user can. Make a separate Home Assistant user with no admin rights for it if you share the Mac.

Variations

An attribute instead of the state

Use the key path attributes.NAME, for example attributes.current_temperature on a climate entity or attributes.elevation on sun.sun.

A computed number (template)

Ask Home Assistant to render a template and print just the result. This counts lights that are on:

Command
curl -s -m 5 -H "Authorization: Bearer $(security find-generic-password -s home-assistant -w)" -H 'Content-Type: application/json' -d '{"template": "{{ states.light | selectattr(\"state\", \"eq\", \"on\") | list | count }}"}' http://homeassistant.local:8123/api/template

Solar, EV and power

Point the command at the entity your integration creates: a solar inverter’s sensor.*_power, the car’s sensor.*_battery_level, an energy monitor’s watts. Same key path, state.

Without the Script source

In the Mac App Store version, have a Home Assistant automation call a shell command or a REST command that writes the value to a file your Mac can read, and use a File meter.

Troubleshooting

What the meter says, why, and what to do
SymptomCauseFix
The script didn’t print a numberThe command failed or printed an error message instead.Run the exact command in Terminal. If it works there, check for tools that live outside the meter’s PATH and use their full path (which tool).
The script took longer than 10 secondsA slow network call. Multimeter stops scripts after 10 seconds.Keep the -m timeout on curl, and refresh less often.
Scripts need the version from multimeterapp.comThis copy of Multimeter came from the Mac App Store, which can’t run scripts.Use the direct download version, or run the command from cron or launchd and point a File meter at its output.
The meter shows 401 or no numberThe token is wrong or was deleted.Create a new long-lived token and run the Keychain command again; it replaces the old one.
No number found for a sensor that shows “unavailable”The device is offline, so the state is text.That is correct behavior; the meter shows the message until the sensor is back.

Questions

Can I use Nabu Casa or my external address?

Yes. Replace the address with your remote URL; the token works the same way.

Is it safe to keep the token in the Keychain?

It is the safest place on a Mac for it: encrypted, unlocked with your login, and never written into the command, a dotfile or your shell history. The meter reads it with the security tool each time it runs.

Does this work in the Mac App Store version?

Script meters need the direct download version from multimeterapp.com, because the App Store sandbox doesn’t let apps run your commands. Web Address, File and Sent Value meters work in every version.

Related

Put it in your menu bar

$19.99 one-time. No subscription. Needs macOS 13 Ventura or later.