A different take on designing a Lovelace UI

Theres any way to get a automation state inside a variable? the entity.state its not valid because the state that i want is not the sabe as the entity refered in the card. Look:

variables:
  circle_input: >
    [[[ "return automation.auto_alarm"; ]]]