From 73a34cdc8037af60b07e141123a10ba408b7befb Mon Sep 17 00:00:00 2001 From: veista Date: Thu, 6 Jan 2022 23:37:14 +0200 Subject: [PATCH] Added Icons for deltaEnergy and powerEnergy --- custom_components/smartthings/sensor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_components/smartthings/sensor.py b/custom_components/smartthings/sensor.py index 7900a30..d696f5c 100644 --- a/custom_components/smartthings/sensor.py +++ b/custom_components/smartthings/sensor.py @@ -751,4 +751,10 @@ def native_unit_of_measurement(self): if self.report_name == "power": return POWER_WATT return ENERGY_KILO_WATT_HOUR + + @property + def icon(self) -> str | None: + if self.report_name in ("deltaEnergy", "powerEnergy"): + return "mdi:current-ac" + return None \ No newline at end of file