tijsverkoyen / HomeAssistant-FusionSolar

Integrate FusionSolar into your Home Assistant.
MIT License
133 stars 25 forks source link

Kiosk mode: SyntaxWarning: invalid escape sequence '\?' #160

Closed LAdegeest closed 2 months ago

LAdegeest commented 3 months ago

Describe the bug

Yesterday, I integrated the FusionSolar kiosk mode. Data is displayed in Home Assistant, but the log-file shows the following warning:

WARNING (ImportExecutor_0) [py.warnings] /config/custom_components/fusion_solar/fusion_solar/kiosk/kiosk.py:16: SyntaxWarning: invalid escape sequence '\?' id = re.search("\?kk=(.*)", self.url).group(1)

Debug information Answer the questions below before submitting a new issue.

To Reproduce Steps to reproduce the behavior: Restart Home Assistant, and the same message pops up.

Expected behavior No warning

Screenshots

This error originated from a custom integration.

Logger: py.warnings Source: custom_components/fusion_solar/sensor.py:21 integration: Fusion Solar (documentation, issues) First occurred: 11:59:46 (1 occurrences) Last logged: 11:59:46

/config/custom_components/fusion_solar/fusion_solar/kiosk/kiosk.py:16: SyntaxWarning: invalid escape sequence '\?' id = re.search("\?kk=(.*)", self.url).group(1)

tijsverkoyen commented 2 months ago

Why version of Python are you using? Can you check if there are no spaces at the end or beginning of the kiosk id

LAdegeest commented 2 months ago

I don't see the message anymore after updating the core from 4.1 to 4.2. So seem to be OK