Installation question

I just installed on Pi. All seems to be working except when I add an object(switch), it is not showing up on the panel. Doesn’t seem to matter where i place the code in the configuration.yaml file. Any assistance would be appreciated

switch:
platform: mqtt
name: “Back PorchTest”
command_topic: “cmnd/Sonoff3/power”
state_topic: “stat/Sonoff3/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true

Please format the code you posted using “`” so it retains its formatting. That way we can help troubleshoot. Also, please post any relevant errors you’re getting.

“switch:
platform: mqtt
name: “Back PorchTest”
command_topic: “cmnd/Sonoff3/power”
state_topic: “stat/Sonoff3/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true”

No errors, check config passes. I may not be looking for errors where I should be though…Thanks,

switch:
platform: mqtt
name: “Back PorchTest”
command_topic: “cmnd/Sonoff3/power”
state_topic: “stat/Sonoff3/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true

switch:
platform: mqtt
name: “Back PorchTest”
command_topic: “cmnd/Sonoff3/power”
state_topic: “stat/Sonoff3/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true

Sorry but I can’t seem to preserve the formatting

switch:
platform: mqtt
name: “Back PorchTest”
command_topic: “cmnd/Sonoff3/power”
state_topic: “stat/Sonoff3/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true[quote=“Zebulon, post:5, topic:87388, full:true”]

switch:
platform: mqtt
name: “Back PorchTest”
command_topic: “cmnd/Sonoff3/power”
state_topic: “stat/Sonoff3/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true
[/quote]

switch:
    platform: mqtt
    name: "Back PorchTest"
    command_topic: "cmnd/Sonoff3/power"
    state_topic: "stat/Sonoff3/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

I appreciate your willingness to help.

switch:
    platform: mqtt
    name: "Back PorchTest"
    command_topic: "cmnd/Sonoff3/power"
    state_topic: "stat/Sonoff3/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

Sorry, forgot to add that I am not aware of any errors. Check Configuration passed and I performed a restart

Is your code really indented 4 spaces under the switch or are you still struggling to get it to format correctly? It should only be indented two spaces.

switch:
  platform: mqtt
  name: "Back PorchTest"
  command_topic: "cmnd/Sonoff3/power"
  state_topic: "stat/Sonoff3/POWER"
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  retain: true

It ws indented 4 spaces to match a Youtube video instruction. I changed this to two spaces and the switch now shows up. I am now trying to figure out how to test mqtt using Mosquito install app on Home Assist
Thanks

You can use a client like MQTT.fx to test it.

1 Like

I’m stealing that gif.

Feel free. Lots of people already have. :smiley: