StephanJoubert / home_assistant_solarman

Home Assistant component for Solarman collectors used with a variety of inverters.
Apache License 2.0
507 stars 191 forks source link

Invalid escape sequence #559

Open githubDante opened 2 months ago

githubDante commented 2 months ago

Hi,

A small correction is needed here

https://github.com/StephanJoubert/home_assistant_solarman/blob/8ffb55f0f75bffa4a1722d1253a0646a3659c0d6/custom_components/solarman/sensor.py#L199

The regex should be defined as a raw string:

if uom and (re.match(r"\S+", uom)):

otherwise generates a warning.