Smart Home Automation Forum

Full Version: COLB update state in Home Assistant
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
can you upload your config ymal file?
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 }}'
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.
auto report is on
i think i have to set retain=on but i dont know how
can you tell me how to enable retain?
KC868-COLB default retain is ON. what's your mqtt broker install on your HA? if installed mosquito, just check config setting.