From 3f3fd68fc6aeb5886df988dab1d1a06fdabf1636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 29 Mar 2020 16:56:47 +0200 Subject: [PATCH] Add unique_id to sensors Makes them show up in the integrations and makes them editable. Fixes #3 Fixes #4 --- custom_components/coronavirus_hessen/sensor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_components/coronavirus_hessen/sensor.py b/custom_components/coronavirus_hessen/sensor.py index b2a0ad0..7dd2cb0 100644 --- a/custom_components/coronavirus_hessen/sensor.py +++ b/custom_components/coronavirus_hessen/sensor.py @@ -40,6 +40,10 @@ def available(self): def name(self): return self._name + @property + def unique_id(self): + return self._name + @property def icon(self): return "mdi:biohazard"