Smart Home Automation Forum
COLB update state in Home Assistant - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: Development (https://www.kincony.com/forum/forumdisplay.php?fid=4)
+--- Thread: COLB update state in Home Assistant (/showthread.php?tid=2326)



COLB update state in Home Assistant - Dober - 10-03-2022

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?


RE: COLB update state in Home Assistant - admin - 10-03-2022

can you upload your config ymal file?


RE: COLB update state in Home Assistant - Dober - 10-03-2022

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 }}'


RE: COLB update state in Home Assistant - admin - 10-04-2022

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.


RE: COLB update state in Home Assistant - Dober - 10-04-2022

auto report is on
i think i have to set retain=on but i dont know how


RE: COLB update state in Home Assistant - Dober - 10-04-2022

can you tell me how to enable retain?


RE: COLB update state in Home Assistant - admin - 10-04-2022

KC868-COLB default retain is ON. what's your mqtt broker install on your HA? if installed mosquito, just check config setting.