I have tried different value template , but all gave an error
Error rendering template: UndefinedError: 'value_json' is undefined
- platform: mqtt
name: "Plug 2 Humidity"
device_class: "humidity"
state_topic: "tele/plug_2/SENSOR"
value_template: "{{ value_json['AM2301'].Humidity }}"
unit_of_measurement: "%"
retain: true
DrZzs Configuration.yaml Sensor entry: also give a error.
sensor:
- platform: mqtt
state_topic: 'tele/D1mini01/SENSOR'
name: 'Temperature'
unit_of_measurement: 'Ā°F'
value_template: '{{ value_json.DHT11.Temperature }}'
- platform: mqtt
state_topic: 'tele/D1mini01/SENSOR'
name: 'Humidity'
unit_of_measurement: '%'
value_template: '{{ value_json.DHT11.Humidity }}'