What happened?
Device: SONOFF Zigbee smart water valve (SWV-ZFE)
Model ID: SWV-ZFE
Firmware: 1.0.7
Issue:
When using MQTT discovery, the device publishes invalid Jinja2 templates for the following sensors:
- 24_hours_records
- 30_days_records
- 180_days_records
Error in Home Assistant:
TemplateSyntaxError: expected token 'end of print statement', got '_hours_records'
Root cause:
The value_template uses property names that start with numbers:
{{ value_json.24_hours_records | ... }}
This is invalid Jinja2 syntax. It should be:
{{ value_json['24_hours_records'] | ... }}
Expected behavior:
Either fix the template syntax or disable these sensors in MQTT discovery.
What did you expect to happen?
No response
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
2.10.0
Adapter firmware version
Firmware: core: v3.3.1 / zigbee: 20240710
Adapter
SLZB-06U
Setup
HA Green
Device database.db entry
No response
Debug log
No response
Notes
No response
What happened?
Device: SONOFF Zigbee smart water valve (SWV-ZFE)
Model ID: SWV-ZFE
Firmware: 1.0.7
Issue:
When using MQTT discovery, the device publishes invalid Jinja2 templates for the following sensors:
Error in Home Assistant:
TemplateSyntaxError: expected token 'end of print statement', got '_hours_records'
Root cause:
The value_template uses property names that start with numbers:
{{ value_json.24_hours_records | ... }}
This is invalid Jinja2 syntax. It should be:
{{ value_json['24_hours_records'] | ... }}
Expected behavior:
Either fix the template syntax or disable these sensors in MQTT discovery.
What did you expect to happen?
No response
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
2.10.0
Adapter firmware version
Firmware: core: v3.3.1 / zigbee: 20240710
Adapter
SLZB-06U
Setup
HA Green
Device
database.dbentryNo response
Debug log
No response
Notes
No response