Best way to control ceiling fan with lights from always on power (Honeywell 40015 receiver/remote)

I placed an order for the remote/receiver. HD stated in stock, and I should receive it in a few days.

When I save the KOF-CeilingFan code, it shows this error message on the top:

groovy.lang.MissingMethodException: No signature of method: script_app_metadata_8cfd10a7_15e3_4a50_9dbb_80ecf5bdfb43.metadata() is applicable for argument types: (script_app_metadata_8cfd10a7_15e3_4a50_9dbb_80ecf5bdfb43$_run_closure1) values: [script_app_metadata_8cfd10a7_15e3_4a50_9dbb_80ecf5bdfb43$_run_closure1@2ee08bc6]
Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)