Can't get proper json value template with special charactor that's contain "dot" charactor in param

that’s contain “dot” charactor in param.

example 1 : value_template: "{{value_json[‘PMS5003’].PM10 }}"

example 1 : works!!

example 2 : value_template: "{{ value_json[‘PMS5003’].PM2.5}}"

example 2 : can’t get value from param “PM2.5” that contain with “dot”

any one know how to get rid of this

thanks

try wrapping your PM2.5 in quotes inside []

i try with :

value_template: "{{ value_json.[‘PMS5003’].[‘PM2.5’] }}"

but there still error

remove the dot between ] and [

2 Likes

thanks @flamingm0e all works

value_template: “{{ value_json[‘PMS5003’][‘PM2.5’] }}”