Question regarding public ip as query in Shodan (home assistant reddit post)

Hi,
Noticed this thread on reddit and thought it might get more traction over here.

https://www.reddit.com/r/homeassistant/comments/8ujdru/how_to_go_about_to_use_public_ip_in_shodan_query/

I get my public ip from the Google Wifi component ie sensor.google_wifi_local_ip. How do I get that as a variable into the shodan component query to monitor if there are any hits?