You need to use a State trigger then condition on the values contained in the context variable of the entity’s state object:
context