You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a "value_template" is formatted for example as : "{{ value_json.state_l1 }}", this is not recognized because of the unexpected spaces between "{" and "v" and between "1" and "}". O.a. zigbee2mqtt returns this format for my lidl power switches.
I have added extra whitespace patterns in the regular expressions for all calls matching the value_template string to fix the issue. Will try to create a PR to upload my changes.
The text was updated successfully, but these errors were encountered:
rrozema
added a commit
to rrozema/domoticz_mqtt_discovery
that referenced
this issue
Feb 21, 2023
In my 1st revision I also changed the match pattern for the value to look for \w+, which is actually not correct: all characters -except "/"- seem to be allowed in topic names. This does however present us with an issue: is any whitespace after the topic name also to be considered to be part of the topic name or not?
(I shot myself in the foot with this change, because several topics for a device I'm building have "-" in their topic name. Those devices were no longer added nor updated after my change...)
When a "value_template" is formatted for example as : "{{ value_json.state_l1 }}", this is not recognized because of the unexpected spaces between "{" and "v" and between "1" and "}". O.a. zigbee2mqtt returns this format for my lidl power switches.
I have added extra whitespace patterns in the regular expressions for all calls matching the value_template string to fix the issue. Will try to create a PR to upload my changes.
The text was updated successfully, but these errors were encountered: