Skip to content

Commit

Permalink
add code for the uuid normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeyev committed Jun 8, 2024
1 parent c99d330 commit 4b3b409
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/eyeonwater/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def __init__(
"""Initialize the sensor."""
super().__init__(coordinator)
self.meter = meter
chars = [c if c.isalnum() or c == "_" else "_" for c in meter.meter_uuid]
self._uuid = "".join(chars)

self._state: pyonwater.DataPoint | None = None
self._available = False
self._historical_sensor = True
Expand Down

0 comments on commit 4b3b409

Please sign in to comment.