Anyone know how to get the state/attributes of an entity in an iOS shortcut?

I’m trying to create conditional iPhone shortcuts with the companion app, but there doesn’t seem to be a shortcut action for reading in the state or the attributes of an entity in Home Assistant. To be clear, I’m not trying to simply run automations with conditions, but rather to have a shortcut flow depending on the state of entities in my smart home, or even the values of input_booleans. The iOS Home app has a shortcut action called ‘Get the state of [Home name]’ that does exactly what I’m trying to do.

I’m not aware of a way to pass back data in an automation/script/mobile action. I’ve also tried registering my own services in Pyscript and Appdaemon that return a value, but it seems these services still don’t return any data. Is the rest api currently the only way to get entity state in this manner?

I’d greatly appreciate if anyone has an idea of how to do this, otherwise maybe this should be a feature request.

Use the template render action and put in whatever you’d like to query.

1 Like

This is perfect, thank you. I’m not sure how I skipped over that functionality.