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
- 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 - Find the entity id in Settings, Devices & services, Entities (for example
sensor.living_room_temperature). Then check it in Terminal:Commandcurl -s -m 5 -H "Authorization: Bearer $(security find-generic-password -s home-assistant -w)" http://homeassistant.local:8123/api/states/sensor.living_room_temperature - Add a Script meter with the command, your address and your entity id, and set the key path to
state. - 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):
| Setting | Value |
|---|---|
| Source | Script |
| Command | the curl line above, with your entity |
| Key path | state |
| Refresh every | 30 seconds |
| Range | fits the sensor, like 50 to 90 |
| Unit | like °F, W or % |
| Alerts | as you like, for example High values at 78 and 82 |
| Face | Thermometer 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:
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/templateSolar, 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
| Symptom | Cause | Fix |
|---|---|---|
| The script didn’t print a number | The 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 seconds | A 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.com | This 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 number | The 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.