What could be the reason for a switch only showing up after restart of hass?

I’m a bit puzzled how to troubleshoot this. I have added a switch to switches.yaml with the following code (just a slightly modified example):

  - platform: mqtt
    name: "TV Light"
    state_topic: "stat/sonoff/POWER"
    command_topic: "cmnd/sonoff/POWER"
    availability_topic: "tele/sonoff/LWT"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false

I am currently configuring the RPi the installation is running on and had to reboot it a couple of times. Without fail the above switch fails to appear at all in the UI while others do. Then when I either restart hass via the hass ui and restart it from the command line with sudo systemctl restart [email protected] it magically appears. A Hue Bridge and another switch are showing up immediately, just not this Sonoff. Any ideas? Are there any log files i’m probably misinterpreting?

This maybe unrelated but my homeassistant-log shows just this message. What data in what config entry is this referring to? I only have one configuration.yaml, haven’t I?
2018-11-15 19:06:27 WARNING (MainThread) [homeassistant.components.mqtt] Data in your config entry is going to override your configuration.yaml: {'username': 'pi', 'broker': '', 'port': 1883, 'discovery': True, 'password': 'xxxxx'}

Sorry if this sounds really silly and obvious, but it’s all still very new to me.

#edit: i since consolidated my two switches into configuration.yaml, removed the above mentioned config entry because it is manually specified yet the problem persists. The command_line switch is showing up after a reboot, the Sonoff/mqtt switch only shows up after i manually restart hass. The log is empty after clearing that config warning.