Run script when temperature is below X degrees

There’s a possible Pushcut solution here but I’d really rather do this on my Mac or something that doesn’t rely on an iOS device being running 24/7.

I guess the easiest way to do this would be if there’s a way to use Shortcuts on the Mac to get the current temperature in a given room that has a HomeKit thermometer in it.

Then I could run that Shortcut as part of a script and run my actions depending on the answer.

However, I can’t seem to find a way to do that via Shortcuts on the Mac.

Any chance that I’m missing something, or is there another way to do it?

The good news is: HomeKit now supports temperature triggers itself.
The bad news is: That doesn’t allow you to run something on the Mac.

What temperature (sensor) are you monitoring? I wonder if you could hook up IFTTT/Zapier/Integromat to run a Keyboard Maestro Macro when the temperature drops. Though, as I typed that I realised: a Home Automation converted to a Shortcut, can use the Get Contents of URL action, which could be the Keyboard Maestro trigger (if the local URL doesn’t work, then you might have to use the public web trigger)!

It’s an Eve “Weather” or something like that.

The Philips Hue motion sensor has a temperature sensor in it that you can use to monitor temp in a room. In the other thread I linked to a blog post where I wrote up how I did this using Geektool, Keyboard Maestro, and JSON Helper. Using Hue motion sensor temperature with Geektool and Keyboard Maestro -

Signals for HomeKit now has a Mac version and through an in app purchase allows you to trigger a shortcut when a certain trigger is met.

Shane Whatley spoke about it on the latest MPU episode.

I know IFTTT can be used with a lot of smart thermostats, and Netatmo weather modules f.e.
Unfortunately Eve weather does not have an IFTTT channel, but maybe the thermostat does, and it’s in te right place?

Another alternative would be using the shortcuts CLI to get the current temperature and poll it via cron for example.

In the example statement below, I have a shortcut that just returns the temperature.