Skip to content

Commit

Permalink
Added Icons for deltaEnergy and powerEnergy
Browse files Browse the repository at this point in the history
  • Loading branch information
veista committed Jan 6, 2022
1 parent 1e11115 commit 73a34cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions custom_components/smartthings/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 73a34cd

Please sign in to comment.