Palli
(Páll Gíslason)
1
Hi
I got problem reading state of a value template from mqtt
but i only get unknow state
Here is the mqtt code:
binary_sensor:
- name: "Hurd Opin"
state_topic: "OFN2"
value_template: "{{ value_json.DOORS-Open }}"
force_update: true
any idea how i can read this, because mqtt explorer can clearly read 1 or 0 for this object
francisp
(Francis)
2
Show the message received on OFN2
francisp
(Francis)
4
Does not help, show the whole json in a codeblock, so I don’t have to type it over when looking at it.
Palli
(Páll Gíslason)
5
sensor:
- name: “Hitastig Ofn2”
state_topic: “OFN2”
value_template: “{{ value_json.OfnTemp | round (1)}}”
icon: mdi:thermometer
unit_of_measurement: ‘°C’
force_update: true
device_class: temperature
state_class: measurement
- name: "Tími total Ofn2"
state_topic: "OFN2"
value_template: "{{ value_json.BTIMI_TOT / 60 }}"
force_update: true
- name: "Kælitími Ofn2"
state_topic: "OFN2"
value_template: "{{ value_json.KTimi1 / 60 }}"
force_update: true
- name: "Timestamp Ofn2"
state_topic: "OFN2"
value_template: "{{ as_datetime(value_json.timestamp)}}"
force_update: true
- name: "Uppskrift Armur 1"
state_topic: "OFN2"
value_template: "{{ value_json.ArmUppskrift_1 }}"
force_update: true
- name: "Uppskrift Armur 2"
state_topic: "OFN2"
value_template: "{{ value_json.ArmUppskrift_2 }}"
force_update: true
- name: "Uppskrift Armur 3"
state_topic: "OFN2"
value_template: "{{ value_json.ArmUppskrift_3 }}"
force_update: true
binary_sensor:
- name: "Hurd Opin"
state_topic: "OFN2"
value_template: "{{ value_json.DOORS-Open }}"
force_update: true