diff --git a/custom_components/solarman/sensor.py b/custom_components/solarman/sensor.py index 10e931d..40d41a5 100644 --- a/custom_components/solarman/sensor.py +++ b/custom_components/solarman/sensor.py @@ -196,7 +196,7 @@ def update(self): self.p_state = val[self._field_name] else: uom = getattr(self, 'uom', None) - if uom and (re.match("\S+", uom)): + if uom and (re.match(r"\S+", uom)): self.p_state = None _LOGGER.debug(f'No value recorded for {self._field_name}')