Hi there,
I have ten lywsd03mmc sensors scattered around the house and want to collect their data with esp32’s which are already doing something else. The placement of the esp devices is not perfect, so sometimes a sensor is catched by one esp and sometimes by another. To make sense of all this, my plan was the following:
- Configure every sensor within every esp
- Send sensor data to a sensor-specific mqtt topic (one topic for sensor one, another topic for sensor two, etc.)
- Configure a mqtt device for each topic to bundle the sensors together in home assistant
I’m already failing at step two: The states are published to HA via MQTT, but my configured topics aren’t used. What I’ve tried (smaller testing config):
[ESPHome config]
sensor:
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:8A:XX:XX"
bindkey: "XXXXX"
temperature:
name: "Temp01"
state_topic: homeassistant/sensor/LYWSD03MMC_02/Temp
humidity:
name: "Hum01"
state_topic: homeassistant/sensor/LYWSD03MMC_02/Hum
battery_level:
name: "Bat01"
state_topic: homeassistant/sensor/LYWSD03MMC_02/Bat
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:73:YY:YY"
bindkey: "YYYYY"
temperature:
name: "Temp04"
state_topic: homeassistant/sensor/LYWSD03MMC_04/Temp
humidity:
name: "Hum04"
state_topic: homeassistant/sensor/LYWSD03MMC_04/Hum
battery_level:
name: "Bat04"
state_topic: homeassistant/sensor/LYWSD03MMC_04/Bat
- platform: uptime
name: Uptime
The state topic seems to be ignored. Can someone push me in the right direction, or is this approach doomed to fail?