-
Notifications
You must be signed in to change notification settings - Fork 170
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
'floorplan.text_set' is broken since 1.0.37 #355
Comments
Can’t reproduce. It’s still works fine for me? |
Is your text in quotes? |
Thank you for the bug report. Have you checked the release notes for 1.0.36 and 1.0.37? https://github.com/ExperienceLovelace/ha-floorplan/releases/tag/1.0.36 I've just tested this: - service: floorplan.text_set
service_data:
text: |
> /* Split text to two tspans*/
return 'Multiline\nTSPAN-Print'; That work as expected. The same goes for: service_data: '${"Multiline\nTSPAN-Print2"}' But I can confirm that the following doesn't work: # Doesnt work...
- service: floorplan.text_set
service_data: 'Multiline\nTSPAN-Print2' As a end-user I'd expect that to work, too. That's the only solution where I face any issues. I'll try and remember that case, next time I'm looking into the code-base (Update: That part is now created as a separate issue - See #356 ). However, I'm unable to reproduce the bug you're talking about. So I need more information. Here's my tests: - service: floorplan.text_set
service_data: ANYTEXT This logic works just fine here, and is rendered as expected. Same goes for: - service: floorplan.text_set
service_data: |
>
return entity.state + '\n'; That works, too. I need a full example with both a bit mor YAML, tested where you're able to:
And I'd need a sample SVG file too, to see if it's here where things get problematic. Kindly provide a stripped down version, to speed things up. |
You don’t need to wrap basic text in braces. So change |
Hi @OzGav I am using Edge on Windows 10, pretty standard setup. I can see the same behavior on my HA app on android. |
Your further fault finding may prove useful. Of interest I don’t edit via the UI so I don’t have the quotes stripped off. Not sure if that makes a difference at the end of the day but thought I would mention it. Thoughts @exetico |
@RadekHvizdos Oh, edited in GUI. I need to check how it's formatted and provided to ha-floorplan through the Home Assistant YAML parser. I guess you know the workaround by now, but I'll keep this open. I have updated the first post. Just edit it, if you disagree with something. |
Hi @exetico, Have you had time to look at this issue already? Thanks, |
The things I've picked up in the conversation should be fixed in: Let me know if you disagree. |
Describe the bug
'floorplan.text_set' is broken since 1.0.37. It now requires a newline (\n) character to be present to print even single lines.
To Reproduce
Steps to reproduce the behavior:
Kindy note that step 1 is if the YAML is edited in the GUI. See pictures in the end of the issue-report.
Expected behavior
Single line text should be visible without using an explicit newline
Images
![image](https://private-user-images.githubusercontent.com/3549445/261093547-93f1de5e-fc7b-4903-8d5f-35bfad3b86c3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NjcxMDgsIm5iZiI6MTcyNDc2NjgwOCwicGF0aCI6Ii8zNTQ5NDQ1LzI2MTA5MzU0Ny05M2YxZGU1ZS1mYzdiLTQ5MDMtOGQ1Zi0zNWJmYWQzYjg2YzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjdUMTM1MzI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTJhZjEyMWExMGRlOTcxNzE5NTJlOTM5MTY4YTY3NmVjZmU5NjNhNWM0NGU4ZjViOGZlOWZiYmQwYjczZjUyNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.QHZJ97XFlMBhK6-3nCBO3e4gPCs1bZCbY64NS9o_ZfI)
The text was updated successfully, but these errors were encountered: