I have updated my KC868-server to Home Assistant 2022.12.0, now all my sensors and switches from my KC868-Server are "unavailable".
below is my sample configuration. Is the a new configuration for HA 2022.12.0, as they have been warning that this updates will affect the sensor.
mqtt:
broker: 192.168.0.118
port: 1883
username: mqtt
password: 1232332TESETEST
# Example configuration.yaml entry
switch:
- platform: mqtt
name: 'output-1'
unique_id: output-1
state_topic: 'server/a767350037679/state'
command_topic: 'server/a767350037679/set'
payload_on: '{"relay1":{"on":1}}'
payload_off: '{"relay1":{"on":0}}'
value_template: '{{ value_json.relay1.on }}'
state_on: 1
state_off: 0
- platform: mqtt
name: 'output-2'
unique_id: output-2
state_topic: 'server/a767350037679/state'
command_topic: 'server/a767350037679/set'
payload_on: '{"relay2":{"on":1}}'
payload_off: '{"relay2":{"on":0}}'
binary_sensor:
- platform: mqtt
name: 'input-1'
unique_id: input-1
state_topic: 'server/a767350037679/state'
value_template: '{{ value_json.input1.on }}'
payload_on: 1
payload_off: 0
- platform: mqtt
name: 'input-2'
unique_id: input-2
state_topic: 'server/a767350037679/state'
value_template: '{{ value_json.input2.on }}'
payload_on: 1
payload_off: 0
value_template: '{{ value_json.relay2.on }}'
state_on: 1
state_off: 0
sensor:
- platform: mqtt
name: 'analog-1'
unique_id: analog-1
state_topic: 'server/a767350037679/state'
unit_of_measurement: 'v'
value_template: '{{ value_json.analog1.value }} '
- platform: mqtt
name: 'analog-2'
unique_id: analog-2
state_topic: 'server/a767350037679/state'
unit_of_measurement: 'v'
value_template: '{{ value_json.analog2.value }} '
below is my sample configuration. Is the a new configuration for HA 2022.12.0, as they have been warning that this updates will affect the sensor.
mqtt:
broker: 192.168.0.118
port: 1883
username: mqtt
password: 1232332TESETEST
# Example configuration.yaml entry
switch:
- platform: mqtt
name: 'output-1'
unique_id: output-1
state_topic: 'server/a767350037679/state'
command_topic: 'server/a767350037679/set'
payload_on: '{"relay1":{"on":1}}'
payload_off: '{"relay1":{"on":0}}'
value_template: '{{ value_json.relay1.on }}'
state_on: 1
state_off: 0
- platform: mqtt
name: 'output-2'
unique_id: output-2
state_topic: 'server/a767350037679/state'
command_topic: 'server/a767350037679/set'
payload_on: '{"relay2":{"on":1}}'
payload_off: '{"relay2":{"on":0}}'
binary_sensor:
- platform: mqtt
name: 'input-1'
unique_id: input-1
state_topic: 'server/a767350037679/state'
value_template: '{{ value_json.input1.on }}'
payload_on: 1
payload_off: 0
- platform: mqtt
name: 'input-2'
unique_id: input-2
state_topic: 'server/a767350037679/state'
value_template: '{{ value_json.input2.on }}'
payload_on: 1
payload_off: 0
value_template: '{{ value_json.relay2.on }}'
state_on: 1
state_off: 0
sensor:
- platform: mqtt
name: 'analog-1'
unique_id: analog-1
state_topic: 'server/a767350037679/state'
unit_of_measurement: 'v'
value_template: '{{ value_json.analog1.value }} '
- platform: mqtt
name: 'analog-2'
unique_id: analog-2
state_topic: 'server/a767350037679/state'
unit_of_measurement: 'v'
value_template: '{{ value_json.analog2.value }} '