My bad, I didn’t realize “service” could have multiple meanings. Yes, I’ve written a custom component that offers a service to do the checking logic.
I thought my problem was on the configuration side but it’s actually on the integration side which is out of scope here as you said.
The answers provided to my original question are right: No you can’t do it in a condition
But, if you have an integration with a service built to return results and are using HA >= 2023.7, you should be able to do something along the lines of:
Well, the value_template won’t be just {{ check_result }}, it’ll have to extract the key from the dictionary. response variables can only be dictionaries. So, it will be something like "{{ check_result.value }}"
Using my integration here (I’m still getting it to pass validation at the time of writing, so ignore that) I added the following to my configuration.yaml:
Not a full A-Z solution yet but most of the way there, it should be easy enough to throw a value from the front end into this script and have it working