TCP sensor

I have a tcp sensor in my config:

 - platform: tcp
    name: bedpage
    host: 192.168.0.155
    port: 80
    payload: "sys"

It returns:

{"uuid":"c86408621b8230326c71d9f7dc1d","interface":"station","prov":{"types":[]},"connection":{"station":{"mac_addr":"6c:71:d9:f7:dc:1d","configured":1,"status":2,"ssid":"hiddenridge2","bssid":"bc:a5:11:1c:ae:0e","channel":8,"security":5,"ip":0,"rssi":-47,"ipaddr":"192.168.0.155","ipmask":"255.255.255.0","ipgw":"127.0.0.1","ipdns1":"127.0.0.1","ipdns2":"127.0.0.1"}}}


However the sensor always shows unavailable. I am obviously missing something

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Thanks. I forget to do that and/or how.
At 82 I claim the right to forget,

As it is, your sensor state is larger than 255 char, which is not supported.
Use a value_template to extract the exact information you are interested in.