Sorry, that’s my mistake. On closer inspection of your MQTT Explorer screenshot, I see that the key word is payload
not Payload
.
mqtt:
sensor:
- name: Heat Pump Power
unique_id: hp_pwr_abc123
state_topic: Heatpump
value_template: "{{ value_json.payload.Watt }}"
device_class: power
unit_of_measurement: W
json_attributes_topic: Heatpump
json_attributes_template: "{{ value_json.payload | tojson }}"
Simply change it in your MQTT Sensor’s configuration then execute Developer Tools → YAML → Reload Manually Configured MQTT Entities.