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 4b3b409 commit 3fcf9a5
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 @@ -210,6 +210,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

Expand Down

0 comments on commit 3fcf9a5

Please sign in to comment.