diff --git a/custom_components/raincloud/__init__.py b/custom_components/raincloud/__init__.py index 6669cee..b71f85d 100644 --- a/custom_components/raincloud/__init__.py +++ b/custom_components/raincloud/__init__.py @@ -143,10 +143,13 @@ def __init__(self, data, sensor_type): self._sensor_type = sensor_type self._state = None - if hasattr(self.data, '_faucet'): - self._name = f"{self.data._faucet.id}: Zone {self.data.id} {KEY_MAP.get(self._sensor_type)}" + if self.data.name is '': + if hasattr(self.data, '_faucet'): + self._name = f"{self.data._faucet.id}: Zone {self.data.id} {KEY_MAP.get(self._sensor_type)}" + else: + self._name = f"{self.data.id} {KEY_MAP.get(self._sensor_type)}" else: - self._name = f"{self.data.id} {KEY_MAP.get(self._sensor_type)}" + self._name = f"{self.data.name} {KEY_MAP.get(self._sensor_type)}" @property def name(self): diff --git a/custom_components/raincloud/manifest.json b/custom_components/raincloud/manifest.json index 7d28b28..2b1df75 100644 --- a/custom_components/raincloud/manifest.json +++ b/custom_components/raincloud/manifest.json @@ -2,6 +2,6 @@ "domain": "raincloud", "name": "Melnor RainCloud", "documentation": "https://www.home-assistant.io/integrations/raincloud", - "requirements": ["raincloudy==1.0a3"], + "requirements": ["raincloudy==1.0.0"], "codeowners": ["@vanstinator"] } \ No newline at end of file