Integrate Wemos D1 with mqtt

The values are “Power”, Total kWh recieved, Total kWh sent (Solar Power)…
Do i have to put individual sensors for each value in my configuration.yaml?

Would the device still show up, even when no sensors are calibrated? (just like my mqtt config in configuration.yaml from a few posts before)?

This should show up :

  - platform: mqtt
    name: "stromzaehler_wpf"
    state_topic: "stromzaehler/WPf"

  - platform: mqtt
    name: "stromzaehler_wpr"
    state_topic: "stromzaehler/WPr"

and so on. Remember, MQTT topics are case sensitive !

Although I think the messages under 15m might be more interesting.

So i have to write these sensors into my configuration.yaml or should they appear somewhere after i added

sensor:
  - platform: mqtt
    state_topic: "stromzaehler"

?

You use them instead of

sensor:
  - platform: mqtt
    state_topic: "stromzaehler"

So :

sensor:
  - platform: mqtt
    name: "stromzaehler_wpf"
    state_topic: "stromzaehler/WPf"

  - platform: mqtt
    name: "stromzaehler_wpr"
    state_topic: "stromzaehler/WPr"

Did you look already what is under 15m ?

ok thanks
Do i need to specify any values like Watt or kWh in the configuration.yaml?

It should be the values from the last 15 minutes together (so Energy Consumed in the last 15 minutes and so on…)

You can, if you know the values. WPF, WPr, WQf etc. don’t tell me anything.

sensor:
  - platform: mqtt
    name: "stromzaehler_wpf"
    state_topic: "stromzaehler/WPf"
    unit_of_measurement: 'W'

  - platform: mqtt
    name: "stromzaehler_wpr"
    state_topic: "stromzaehler/WPr"
    unit_of_measurement: 'W'

or whatever is correct.

Thanks
It is explained on the webpage i linked above (but in german)…

With your code i got the sensors to show up in HassIO but now i get this message…:

image

A unique_id is not really necessary, but you can add a unique id :

sensor:
  - platform: mqtt
    name: "stromzaehler_wpf"
    state_topic: "stromzaehler/WPf"
    unit_of_measurement: 'W'
    unique_id: "stromzaehler_wpf"

  - platform: mqtt
    name: "stromzaehler_wpr"
    state_topic: "stromzaehler/WPr"
    unit_of_measurement: 'W'
    unique_id: "stromzaehler_wpr"

You can repeat the same for the other values (WQf etc…)

Oh okay :slight_smile:
i am still learning, very much at the beginning ^^

I already put in a few of the other values, it works!

Thanks for your help :slight_smile: