Hope someone can give me some help.
I use a RFLINK setup with espRFLinkMQTT to publish to my mqtt server. This setup is working and i got TEMP sensors setup that show my temp in Home Assistant.
Then i got a DKW2012 weather station that also publish to rflink/DKW2012-00c0 with a payload of get this from MQTT Explorer
{“TEMP”:27.6,“HUM”:23,“WINSP”:0.0,“WINGS”:0.0,“RAIN”:0.0,“WINDIR”:0014,“BAT”:“OK”}
and using the command
mosquitto_sub -h 192.168.xx.xx -t “rflink/DKW2012-00c0” -v
result is
rflink/DKW2012-00c0 {“TEMP”:28.0,“HUM”:23,“WINSP”:0.0,“WINGS”:0.0,“RAIN”:0.0,“WINDIR”:0000,“BAT”:“OK”}
I set up a sensor in configuration.yaml under sensor:
RFLINK
- platform: mqtt
name: “DKW Temp”
unique_id: dkw_temp
state_topic: “rflink/DKW2012-00c0”
value_template: “{{ value_json[‘TEMP’] }}”
device_class: temperature
unit_of_measurement: “ºC”
i also try the following as value_template
value_template: “{{ value_json.TEMP }}”
value_template: “{{ value_json[‘TEMP’].value }}”
under my development tool template i tested the template with the following and then is show now problem
{% set value_json=
{“TEMP”:27.5,“HUM”:23,“WINSP”:0.0,“WINGS”:3.7,“RAIN”:3.9,“WINDIR”:0004,“BAT”:“OK”}%}
{{value_json[‘TEMP’]}}
{{value_json.HUM}}
{{value_json.WINSP}}
{{value_json.WINGS}}
{{value_json[‘RAIN’] }}
{{value_json.WINDIR}}
{{value_json.BAT}}
can anyone help me
Thanks
Henry