IoT Link to HA in JSON

Update: Figured out the JSON (below), however, that did not solve the issue of the Automation continually firing :upside_down_face:

{{ states.sensor.my_computer_session_status.state }}

Reason for this Topic…The Automation I created is continually firing for every/any change made to an any other HA Automation. It’s my understanding that by using a value_template, I could accomplish my task w/o it then continually firing.

I have the below IoT Link mqtt message; what is the JSON conversion to value_template so it’s recognized in HA?

Topic:
iotlink/home/haf922/windows-monitor/status

Payload:
SessionUnlock

I’m trying to create an Automation from this, though not certain how to code the value_template…

automation:
  trigger:
    - platform: mqtt
      topic: "iotlink/home/haf922/windows-monitor/status"
      payload: "SessionUnlock"
      value_template: "{{ value_json.state }}"

==========================================
Below is a sensor I initially created, but I have no idea what I enter for Attribute in the Automation, so I created the above instead. Simply entering SessionUnlock did not work for me.

sensor.my_computer_session_status
automation:
  trigger:
    - platform: state
      entity_id: sensor.my_computer_session_status
      attribute: friendly_name
      to: SessionUnlock