Starting the boiler if tank has less than x% hot water in it

I’m getting confused here: you are still using an MQTT trigger in the automation but were trying to set up a sensor before. Please decide if you want to set up a sensor (recommended) or use the MQTT trigger in the automation.

Automation numeric_state conditions will do the string-to-number conversion for you, so you don’t need to worry about that provided the incoming string can be converted. It’s only in Jinja templates that you need to do the conversion yourswel

We need to see in correctly-formatted code (see here for instructions how to do this):

  • the sensor configuration you’re using (if you are trying to set one up)
  • the state and attributes of that sensor from Developer Tools / States
  • the automation YAML as above but correctly formatted
  • the topic and exact message you’re looking at — so far, you’ve used both home/HotWaterPercent and /IOT/HotWaterPercent
  • any error messages or log entries