Solar entity conversion for homekit

Hi,

Long story short

Myenergi solar sensor displays in watts

i need to make a LUX sensor of the watt value so i can see it in homekit given apple wont accept energy sensors

ive tried and tried with the templates but without a simple ui saying this sensor to this type im absoltuley lost i have no coding experience and zero home assistant experience im using it for THIS sole purpose.

So far i created a template and got this

  sensors:
     home_energy_usage:
       friendly_name: "Home Energy Usage"
       unit_of_measurement: lx
       device_class: 'illuminance'
       value_template: "{{ states('sensor.myenergi_my_home_power_generation') }}"

But it spits out an issue at the bottom ’ 1. Sensor None has device class ‘illuminance’, state class ‘measurement’ unit ‘lx’ and suggested precision ‘None’ thus indicating it has a numeric value; however, it has the non-numeric value: ‘platform: template sensors: home_energy_usage: friendly_name: “Home Energy Usage” unit_of_measurement: lx device_class: ‘illuminance’ value_template: “583”’ (<class ‘str’>)’

this means NOTHING to me albeit i can see the “583” changing with the sensor so i assume its reading the entity right

can someone treat me like im stupid and point me to HOW exactly to do this with the helpers UI (not just saying put this in your .yaml like i would know cause i wont)

attached an image of how i am adding it etc though this is literally just copy and pasted other peoples work on the internet trying to twist it to work for me as i cant find a solid example of someone doing this exact thing so if its entirley wrong please state this and how to correct.

Than in advance and sorry for the noob help