I have Tasmota (v8.3.1) on my kettle as per https://templates.blakadder.com/kogan-KASMCDSKTLA.html but can’t configure a sensor for the temperature.
Home Assistant 0.111.4
as per docs I have added the following
# Kogan Kettle temperature
- platform: mqtt
name: "Kettle Temperature"
state_topic: kettle/tele/RESULT
value_template: >-
{% if 5 == value_json.TuyaReceived.DpId %}
{{ value_json.TuyaReceived.DpIdData | int(base=16) }}
{% else %}
{{ states('sensor.kogan_temperature') }}
{% endif %}
unit_of_measurement: '°C'
the payload appears correct and tried testing it in Developer Tools \ Template but it is not extracting the data.
Imitate available variables:
{% set value_json = {
"TuyaReceived":{
"Data":"55AA0007001C01010001000502000400000039650100010066040001006704000100A7",
"Cmnd":7,
"CmndData":"01010001000502000400000039650100010066040001006704000100",
"DpType1Id1":0,
"1":{
"DpId":1,
"DpIdType":1,
"DpIdData":"00"
},
"DpType2Id5":57,
"5":{
"DpId":5,
"DpIdType":2,
"DpIdData":"00000039"
},
"DpType1Id101":0,
"101":{
"DpId":101,
"DpIdType":1,
"DpIdData":"00"
},
"DpType4Id102":0,
"102":{
"DpId":102,
"DpIdType":4,
"DpIdData":"00"
},
"DpType4Id103":0,
"103":{
"DpId":103,
"DpIdType":4,
"DpIdData":"00"
}
}
} %}
{% if 5 == value_json.TuyaReceived.DpId %}
{{ value_json.TuyaReceived.DpIdData | int(base=16) }}
{% else %}
Not Working
{% endif %}
How should I be getting the decimal version of “00000039”?
Thanks