Text_sensor not triggering on_value

I have a text_sensor setup in HA and it’s being updated regularly by a Node-Red process. However my esphome sensor is never updating. The entity name is input_test.alarm_url and below is my esphome configuration. Watching the logs I’m connected to the network and it does register this sensor but then it never triggers on_value, even when I force a change through the developer tools. Thanks in advance for any points!

text_sensor:
  - platform: homeassistant
    name: "Alarm Url"
    entity_id: input_text.alarm_url
    id: alarm_url
    internal: true
    on_value:
      lambda: |-
        ESP_LOGD("main", "Alarm URL: %s", x.c_str());

I assume that’s a minor typo;) ? test = text?