core: 2024.2.1: SyntaxWarning: invalid escape sequence '\.'
The problem
After update to 2024.2.* there is a repeated warning in the log:
Logger: py.warnings
Source: helpers/template.py:586
First occurred: 15:55:51 (4 occurrences)
Last logged: 15:56:15
<unknown>:1: SyntaxWarning: invalid escape sequence '\.'
Is there any way to find the cause of the warning?
What version of Home Assistant Core has the issue?
2024.2.1
What was the last working version of Home Assistant Core?
2024.1.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: open
- Created 5 months ago
- Comments: 15 (8 by maintainers)
Nevertheless the problem is how the HA code handles strings. Other places offer this solution is
You can also solve this by changing the string to a raw string, by adding a r prefix