issues
issues copied to clipboard
components/dsmr/text_sensor.py: adding "equipment_id" - single line fix
The problem
In the standard installation the "equipment id" is not propagated, but it is supported by all electricity meters. I have several electricity meters and this helps identify them on the MQTT bus.
This can be remedied by a simple fix, tested and working.
The solution
Suggested commit comment:
Enable the propagation of "equipment_id" parameter.
Example config:
...
text_sensor:
- platform: dsmr
equipment_id:
name: "Energy Meter ID"
...
diff --git a/esphome/components/dsmr/text_sensor.py b/esphome/components/dsmr/text_sensor.py
index 202cc070..50b12e74 100644
--- a/esphome/components/dsmr/text_sensor.py
+++ b/esphome/components/dsmr/text_sensor.py
@@ -17,6 +17,7 @@ CONFIG_SCHEMA = cv.Schema(
cv.Optional("electricity_failure_log"): text_sensor.text_sensor_schema(),
cv.Optional("message_short"): text_sensor.text_sensor_schema(),
cv.Optional("message_long"): text_sensor.text_sensor_schema(),
+ cv.Optional("equipment_id"): text_sensor.text_sensor_schema(),
cv.Optional("gas_equipment_id"): text_sensor.text_sensor_schema(),
cv.Optional("thermal_equipment_id"): text_sensor.text_sensor_schema(),
cv.Optional("water_equipment_id"): text_sensor.text_sensor_schema(),
Which version of ESPHome has the issue?
Version <= 2024.3.0
What type of installation are you using?
pip
What platform are you using?
ESP32
Additional information
Esphome rocks! Thank you all!