Template for volts * amps = watts?

I have volts and amps coming into Home Assistant via MQTT. I want to make a new sensor that shows the Watts.

I added this to my configuration.yaml file

 - sensor:
    - name: Solar Charger Load Watts
      unit_of_measurement: "W"
      icon: mdi:solar-power
      state: >
        {% set AMPS = states('sensor.mppt_75_15_solar_charger_load_amps')|float %}
        {% set VOLTS = states('sensor.mppt_75_15_battery_voltage_setting')|float %}
        {{ (AMPS * VOLTS) | round(2) }}

If I go into the Developer Tools, Template tab, and paste the three lines from state into the template editor, it results in the watts, as expected. But when I restart Home Assistant with the above in configuration.yaml, that new sensor is nowhere to be found I cannot see any errors in the logs. It is like that section is just being ignored. What do I need to do to get this template seonsor to be added to Home Assistant?

Thank you

Does this only appear once in your configuration.yaml file?

Yes, it is only in there once. I now can see it. I am unsure which action really made it show up, but I:

  1. Restarted Home Assistant instead of the quick restart (reload YAML option)
  2. The entity still did not show up in the entities list. I noticed there was a default filter that hid a lot of entities (300+), so I cleared that filter, and suddenly I could see my new entity.

So I believe what was happening was that my entity was hidden by default. Once I saw it and opened it in the entities, then it shows up in the entities and is no longer hidden.

Thank you for your help.