Skip to content

Using variables fails when text property contains more than just the variable #947

@oradke

Description

@oradke

Perform all steps below and tick them with [x]

  • [X ] Check the related part of the Documentation
  • [ X] Update openHASP to the latest version
  • [X ] Reproduce the issue and describe all steps

Describe the bug

Using variables fails when text property contains more than just the variable

To Reproduce

{"page":0,"obj":"label","id":110,"x":410,"y":3,"w":390,"h":40,"text":"%hostname%"}

returns "plate6"

{"page":0,"obj":"label","id":110,"x":410,"y":3,"w":390,"h":40,"text":"%hostname% (%ip%)"}

returns "%hostname% (%ip%)"

Expected behavior

I would expect that all variable names are replaced by the current values, so that
"%hostname% (%ip%)"
becomes
"plate6 (192.168.X.X)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions