I am down to the sensor configuration and lost in this.
Working
- ecowitt2mqtt pythonscript is receiving the GW stream
- MQTT Broker is receiving the ecowitt2mqtt topic (mine is ‘ecowitt2mqtt/device_1’)
- Home Assistant MQTT integration (configuration.yaml MQTT) can listen to the topic above and sees the data.
Data
from the ‘Listen to a topic’
Message 0 received on ecowitt2mqtt/device_1 at 3:52 PM:
{
"tempin": 76.6,
"humidityin": 52,
"baromrel": 29.2,
"baromabs": 29.2,
"temp": 92.7,
"humidity": 46,
"winddir": 33,
"windspeed": 3.1,
"windgust": 4.9,
"maxdailygust": 9.4,
"solarradiation": 601.9,
"uv": 5,
"rainrate": 0,
"eventrain": 0,
"hourlyrain": 0,
"dailyrain": 0,
"weeklyrain": 0,
"monthlyrain": 2,
"yearlyrain": 2,
"totalrain": 2,
"temp1": 90.1,
"humidity1": 49,
"temp3": 81,
"humidity3": 47,
"temp4": -0.2,
"humidity4": 62,
"temp5": 74.7,
"humidity5": 52,
"soilmoisture1": 13,
"lightning_time": "",
"lightning_num": 0,
"lightning": "",
"leak_ch1": 0,
"wh80batt": "on",
"batt1": "off",
"batt3": "off",
"batt4": "off",
"batt5": "off",
"soilbatt1": "on",
"wh57batt": "on",
"leakbatt1": "on",
"dewpoint": 68.9,
"feelslike": 97.8,
"heatindex": 97.8,
"solarradiation_lux": 76189.9,
"solarradiation_perceived": 98,
"windchill": null
}
Question
How do I configure to pull the data into an entity
current configs
sensor.yaml
# MQTT settings
- platform: mqtt
state_topic: 'ecowitt2mqtt/device_1/temp'
name: 'temp_BY'
unit_of_measurement: '°F'
Note I also tried 'ecowitt2mqtt/device_1
Configuration.yaml
I assume this is working as I can listen to the topic
mqtt:
broker: 10.10.10.11
username: mqtt
password: mqtt
port: 1883
discovery: true