Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT Text : Error 'text length min must be >= max' #107726

Closed
grrosminet opened this issue Jan 10, 2024 · 1 comment · Fixed by #107738
Closed

MQTT Text : Error 'text length min must be >= max' #107726

grrosminet opened this issue Jan 10, 2024 · 1 comment · Fixed by #107738
Assignees

Comments

@grrosminet
Copy link

The problem

Wrong test in configuration check : when min == max, it throws the folowing error

Error 'text length min must be >= max' when processing MQTT discovery message topic: ...

Configuration in MQTT autodiscovery topic:

        {
          "name": "Texte Test",
          "state_topic": "custom/TestTexte",
          "command_topic": "custom/TestTexte/set/value",
          "min": 5,
          "max": 5,
          "pattern": "[0-2][0-9]:[0-5][0-9]",
          "unique_id": "custom_test_texte",
          "value_template": "{{ value_json.value }}"
        }

What version of Home Assistant Core has the issue?

core-2024.1.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

MQTT TEXT

Link to integration documentation on our website

https://www.home-assistant.io/integrations/text.mqtt/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.mqtt.mixins
Source: components/mqtt/mixins.py:324
Integration: MQTT (documentation, issues)
First occurred: 14:36:12 (1 occurrences)
Last logged: 14:36:12
Error 'text length min must be >= max' when processing MQTT discovery message topic: 'homeassistant/text/custom_test_texte/text/config', message: '{'command_topic': 'custom/TestTexte/set/value', 'state_topic': 'custom/TestTexte', 'min': 5, 'unique_id': 'custom_test_texte', 'max': 5, 'name': 'Texte Test', 'pattern': '[0-2][0-9]:[0-5][0-9]', 'value_template': '{{ value_json.value }}', 'platform': 'mqtt'}'

Additional information

No response

@home-assistant
Copy link

Hey there @emontnemery, @jbouwh, mind taking a look at this issue as it has been labeled with an integration (mqtt) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mqtt can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign mqtt Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


mqtt documentation
mqtt source
(message by IssueLinks)

@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants