10-03-2022, 11:11 PM
i send you an example of my config
binary_sensor:
- name: 'COLB-D1'
unique_id: COLB-D1
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXX/state'
value_template: '{{ value_json.D1.on if value_json.D1 is defined else this.state }}'
payload_off: 0
- name: 'COLB-D2'
unique_id: COLB-D2
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXXX/state'
value_template: '{{ value_json.D2.on if value_json.D2 is defined else this.state }}'
payload_on: 1
payload_off: 0
sensor:
- name: 'COLB-T1'
unique_id: COLB-T1
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXXXXX/state'
unit_of_measurement: 'Β°C'
value_template: '{{ value_json.T1.value }}'
- name: 'COLB-T2'
unique_id: COLB-T2
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXXXXXX/state'
unit_of_measurement: 'Β°C'
value_template: '{{ value_json.T2.value }}'
binary_sensor:
- name: 'COLB-D1'
unique_id: COLB-D1
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXX/state'
value_template: '{{ value_json.D1.on if value_json.D1 is defined else this.state }}'
payload_off: 0
- name: 'COLB-D2'
unique_id: COLB-D2
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXXX/state'
value_template: '{{ value_json.D2.on if value_json.D2 is defined else this.state }}'
payload_on: 1
payload_off: 0
sensor:
- name: 'COLB-T1'
unique_id: COLB-T1
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXXXXX/state'
unit_of_measurement: 'Β°C'
value_template: '{{ value_json.T1.value }}'
- name: 'COLB-T2'
unique_id: COLB-T2
state_topic: 'COLB/XXXXXXXXXXXXXXXXXXXXXXX/state'
unit_of_measurement: 'Β°C'
value_template: '{{ value_json.T2.value }}'