barleybobs / homeassistant-ecowater-softener

A Homeassistant custom component to integrate Ecowater water softeners
https://github.com/barleybobs/homeassistant-ecowater-softener
MIT License
31 stars 9 forks source link

Invalid regex warning from HA #59

Open piotrtobolski opened 3 weeks ago

piotrtobolski commented 3 weeks ago

I'm getting this warning in logs:

2024-06-07 23:41:49.917 WARNING (ImportExecutor_0) [py.warnings] /config/custom_components/ecowater_softener/coordinator.py:52: SyntaxWarning: invalid escape sequence '\)'
nextRecharge_re = "device-info-nextRecharge'\)\.html\('(?P<nextRecharge>.*)'"
figorr commented 3 weeks ago

I have just seen this warning at log when I restarted HA. It looks like there is a \ that could cause the conflict. Maybe using this expression ... nextRecharge_re = r"device-info-nextRecharge'\)\.html\('(?P<nextRecharge>.*)'"