Skip to content

Commit

Permalink
Merge pull request #7 from dohseven/master
Browse files Browse the repository at this point in the history
generate truly unique sensor names
  • Loading branch information
julcollas authored Aug 25, 2024
2 parents 1e0ab16 + 160f026 commit fee453e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/vigicrues/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def get_waterflowrate(self):
return self.__get_last_point("Q")

def get_name(self):
return self.get_data("H").get("Serie").get("LbStationHydro")
serie_data = self.get_data("H").get("Serie")
return f"{serie_data.get('LbStationHydro')} - {serie_data.get('CdStationHydro')}"

def get_data(self, _type):
params = {"CdStationHydro": self.station_id, "GrdSerie": _type}
Expand Down

0 comments on commit fee453e

Please sign in to comment.