I install hat pumps for a living.
I also own a Grant, and are looking for ways to change the flow temp on the fly.
The Homley device is a great product, currently it does not work with the Grant units.
Are you running that code above in HA YAML.
Great work .