I updated HA last weekend and ended up with lots of broken mqtt devices. Ive been able to fix my mqtt switches, but having issues converting my sensors to the new format. My sensor state is unknown, but I’m receiving mqtt updates for the motion dect. TIA.
I’m far from an expert here, however a couple things jump out.
you have a ‘unit_of_measurement’ of dBM. However, if I read this correctly, you are getting a value for ‘.Data’ of “E39E3E”. That does not appear to be a valid dBm value. Do you think HA did something to check if the value received is compatible with selected ‘unit_of_measurement’?
Seems like you are mixing your state_topic with your availability_topic, I’ve always had these separate, or a least explicitly defined each topic, example below.
Good hunting!
# Third Reality
- name: "Garage Sliding Door East"
device_class: door
unique_id: "0x282c02bfffe7998b-door"
expire_after: 3600
state_topic: "zigbee2mqtt/0x282c02bfffe7998b"
value_template: "{{ value_json.contact }}"
payload_off: false
payload_on: true
availability_topic: zigbee2mqtt/0x282c02bfffe7998b/availability
json_attributes_topic: "zigbee2mqtt/0x282c02bfffe7998b"
Thx Francis, made the changes, but still had issues. After a few hours, I went a different route. I used node red and 3 minutes later its all working again.