Hey everyone, I’m working on integrating data from multiple custom sensors into Home Assistant using MQTT. Each sensor sends data with a unique SensorID, and I want each sensor’s data to appear as a separate entity in HA. However, I’m running into an issue where the value_template I’m using to filter by SensorID is causing the dashboard to display an empty string when data from another sensor arrives. Here’s what I’ve tried so far:
yaml
- name: Sensor 11:11:11:11:11:11:11:11
state_topic: “viktak/spiti/esp-now-bridge/tele”
value_template: >
{% if value_json.Measurement.SensorID == “11:11:11:11:11:11:11:11” %}
{{ value_json.Measurement.Value }}
{% endif %}