This commit is contained in:
@@ -57,13 +57,15 @@ def register_ha_discovery(mqtt, sensor_type):
|
|||||||
]
|
]
|
||||||
|
|
||||||
if sensor_type == "bme280":
|
if sensor_type == "bme280":
|
||||||
configs.append({
|
configs.append(
|
||||||
|
{
|
||||||
"id": "pressure",
|
"id": "pressure",
|
||||||
"name": "Pressure",
|
"name": "Pressure",
|
||||||
"unit": "hPa",
|
"unit": "hPa",
|
||||||
"cls": "atmospheric_pressure",
|
"cls": "atmospheric_pressure",
|
||||||
"val_tpl": "{{ value_json.pressure }}",
|
"val_tpl": "{{ value_json.pressure }}",
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
for c in configs:
|
for c in configs:
|
||||||
topic = f"homeassistant/sensor/{Config.NODE_ID}/{c['id']}/config"
|
topic = f"homeassistant/sensor/{Config.NODE_ID}/{c['id']}/config"
|
||||||
|
|||||||
Reference in New Issue
Block a user