Sonoff POW with Espurna firmware: SOME sensors missing! (SOLVED)

Hi
Connected a Sonoff POW using Espurna firmware with home assistant and the result is:

Switch works, Energy sensons apear and works.
However Voltage, Current, Power (aparent,reactive and real) do not apear at all in HA.

At first i thought it was an issue of the espurna firmware but in that case the sensors would apear blank in HA. But in this case the sensors do not apear and only the energy sensor apears and works ok.

I did not check the mqtt comms because i think it is irrelevant with the sensors not showing in HA (not even as hidden in configuration)

This is my configuration.yaml

switch:
  - name: ESPURNA_B49A9C
    platform: mqtt
    state_topic: ESPURNA_B49A9C/relay/0
    command_topic: ESPURNA_B49A9C/relay/0/set
    payload_on: 1
    payload_off: 0
    availability_topic: ESPURNA_B49A9C/status
    payload_available: 1
    payload_not_available: 0

sensor:
  - name: ESPURNA_B49A9C current
    platform: mqtt
    device_class: sensor
    state_topic: ESPURNA_B49A9C/current
    unit_of_measurement: "A"

sensor:
  - name: ESPURNA_B49A9C voltage
    platform: mqtt
    device_class: sensor
    state_topic: ESPURNA_B49A9C/voltage
    unit_of_measurement: "V"

sensor:
  - name: ESPURNA_B49A9C power
    platform: mqtt
    device_class: sensor
    state_topic: ESPURNA_B49A9C/power
    unit_of_measurement: "W"

sensor:
  - name: ESPURNA_B49A9C reactive
    platform: mqtt
    device_class: sensor
    state_topic: ESPURNA_B49A9C/reactive
    unit_of_measurement: "W"

sensor:
  - name: ESPURNA_B49A9C apparent
    platform: mqtt
    device_class: sensor
    state_topic: ESPURNA_B49A9C/apparent
    unit_of_measurement: "W"

sensor:
  - name: ESPURNA_B49A9C factor
    platform: mqtt
    device_class: sensor
    state_topic: ESPURNA_B49A9C/factor
    unit_of_measurement: "%"

sensor:
  - name: ESPURNA_B49A9C energy
    platform: mqtt
    device_class: sensor
    state_topic: ESPURNA_B49A9C/energy
    unit_of_measurement: "kWh"

You can see that the switch is first and energy sensor last and work ok.
Anything in-between doesn’t!
Any ideas?

Don’t list sensor each time you start a sensor.

It should be:

Sensor:
  - Sensor1
  - Sensor2
  - Sensor3

The following also works and eliminates the repeated platform call.

Sensor:
  - platform: mqtt
      - name1
      - name2
      - name3
1 Like

Worked!!! Thanks a lot

The last one doesnt work btw.

Sensor:
  - platform: mqtt
      - name1
      - name2
      - name3

Some error " expected block end, but found ‘-’ "

Anyways thanks again man.
BTW, the original configuration was taken using the espruna command “ha.config” and appeared to be logical and should have worked IMHO.
All good…

Sorry about that, shouldn’t have added the hyphens.

see below for a working example from my config.
https://github.com/SilvrrGIT/HomeAssistant/blob/master/sensors.yaml#L141

Tested without the hypens and with some adjustments. Not quite there yet. Will try again.
I have a lot of reading to do to undestand how the configuration works underneeth.

Btw, your git page has a very large WOW factor and it is now in my bookmarks :wink: