# Problem in config Sonoff pow switch with home assistant app

**URL:** <https://community.homey.app/t/problem-in-config-sonoff-pow-switch-with-home-assistant-app/17982>\
**Category:** Questions & Help\
**Created:** [September 10, 2019, 2:31pm UTC](https://community.homey.app/t/problem-in-config-sonoff-pow-switch-with-home-assistant-app/17982 "2019-09-10T14:31:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BTE\_OKE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bte_oke/32/15429_2.png) [@BTE\_OKE](https://community.homey.app/u/BTE_OKE)\
**Post date:** [September 10, 2019, 2:31pm UTC](https://community.homey.app/t/problem-in-config-sonoff-pow-switch-with-home-assistant-app/17982/1 "2019-09-10T14:31:04Z")

</div>

Hello,

I installed home assistant 0.98.4 on raspberrypi 2. I configured the mqtt service in the raspberry pi and then I configured the configuration.yaml file.

It’s the config of the mqtt:

mqtt:

broker: [192.168.31.51](https://192.168.31.51/)

username: or94

password:

discovery: true

discovery\_prefix: homeassistant

I configured shelly switch and yeelight in the same file and everthing works great. Yesterday I flashed tasmota for the sonoff pow R2 switch. I configured the mqtt service in the web interface:

 ![yzzmwkak3rl31](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/f/fef4e736a630dbfce906427e2abd8cc1408540fa.png)

I enabled the mqtt in the configure other option in the sonoff web inteface and I wrote friendly name.

Then I tried to config the sonoff in the configuration.yaml:

switch:

- platform: mqtt

name: “Boiler”

state\_topic: “stat/sonoff/power”

command\_topic: “cmnd/sonoff/POWER”

qos: 1

payload\_on: “ON”

payload\_off: “OFF”

retain: true

I restarted the Home assistant server but nothing happened and I don’t have a switch. I saw in the console in the web interface of the sonoff switch and it connected to the wifi and to the mqtt server.

What I am doing wrong?

Thanks

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 10, 2019, 2:41pm UTC](https://community.homey.app/t/problem-in-config-sonoff-pow-switch-with-home-assistant-app/17982/2 "2019-09-10T14:41:47Z")

</div>

Your question isn’t related to Homey at all. Perhaps you should post it on the [Home Assistant community forum](https://community.home-assistant.io/) instead.

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [September 10, 2019, 7:00pm UTC](https://community.homey.app/t/problem-in-config-sonoff-pow-switch-with-home-assistant-app/17982/3 "2019-09-10T19:00:58Z")

</div>



---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [September 10, 2019, 7:01pm UTC](https://community.homey.app/t/problem-in-config-sonoff-pow-switch-with-home-assistant-app/17982/4 "2019-09-10T19:01:11Z")

</div>

Closed for above reason.
