MQTT and 3.10

Hello
Looking for a bit of advice otherwise I will rebuild. Since updating to 3.10 it seems nothing works with my configured MQTT devices.

EDIT: I have deleted and reinstalled MQTT and all is well, the post is now a useful resource for a good working MQTT configuration with Sonoff/Tasmota Bridge, PIR2 sensor and Sonoff basic switches.

image
MQTT Config as follows: Passwords and usernames have been redacted.

logins:
  - username: [REDACTED]
    password: [REDACTED]
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

folder was never created as everything is working.

configuration.yaml containing hub, sensor and switch, no changes prior to update

# hub #
sensor:
  - platform: mqtt
    state_topic: 'tele/sonoff/RESULT'
    name: sonoff
    value_template: "{{ value_json.RfReceived.Data }}"
    expire_after: 1
# IR sensor #    
binary_sensor: 
- platform: template
  sensors:
    sonoff_pir_1:
      value_template: '{{ is_state("sensor.sonoff", "EA360E") }}'
      delay_off: '00:00:03'
      device_class: motion
      friendly_name: "PIR One"
# Switches #      
switch:  
  - platform: mqtt
    name: "Office Light"
    state_topic: "stat/office_light/RESULT"  
    value_template: "{{ value_json.POWER }}"
    command_topic: "cmnd/office_light/POWER"
    availability_topic: "tele/office_light/LWT"    
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    qos: 1
    retain: true

Thanks

I would Install mqtt.fx and set that up so you can see what going from point a to point b

Thanks @myle, download and installed and broker setup, will have a proper play. First I’ve heard of it but seems like a great tool.

this is the way I do mine

I have a sensor call last_rf

#=======================================================================
#
#=======================================================================
  - platform: mqtt
    name: "Last RF"
    state_topic: "tele/RF_Bridge/RESULT"
    value_template: '{{value_json.RfReceived.Data}}'
    expire_after: 1
    qos: 1

which expire after 1 sec

have a number of these around the house

as they dont send a on/off code I just use them to toggle

#=======================================================================
# 
#=======================================================================
- id: rf togger master bedroom light
  alias: Rf Togger Master Bedroom Light
  initial_state: 'on'
  trigger:
  - entity_id: sensor.last_rf
    platform: state
    to: '137852'
  condition: []
  action:
  - data:
      entity_id: light.master_bedroom
    service: light.toggle

also have one that has a 20sec expire

image

so I can copy the code and paste into my automation