Posts: 13
Threads: 5
Joined: Apr 2022
Reputation:
0
hello!
I have COLB connected with home assistant by mqtt, when i restart home assistant all sensors turn to "unknown" to see the state again i have to restart COLB.
What have to do to maintain the state?
Posts: 6,611
Threads: 844
Joined: Oct 2020
Reputation:
161
can you upload your config ymal file?
Posts: 13
Threads: 5
Joined: Apr 2022
Reputation:
0
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 }}'
Posts: 6,611
Threads: 844
Joined: Oct 2020
Reputation:
161
1: set ethernet work mode = TCP Server
2: use KC868-COLB PC software to enable "Auto Report" function.
3: then change to MQTT mode, connect to home assistant.
Posts: 13
Threads: 5
Joined: Apr 2022
Reputation:
0
auto report is on
i think i have to set retain=on but i dont know how
Posts: 13
Threads: 5
Joined: Apr 2022
Reputation:
0
can you tell me how to enable retain?
Posts: 6,611
Threads: 844
Joined: Oct 2020
Reputation:
161
KC868-COLB default retain is ON. what's your mqtt broker install on your HA? if installed mosquito, just check config setting.