From c19a1bf26d23dc875aff5091d49913b0f307d01a Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Tue, 7 Apr 2020 10:45:48 -0400 Subject: [PATCH] Add Sense attribution to all Sense sensors (#33775) --- homeassistant/components/sense/sensor.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/homeassistant/components/sense/sensor.py b/homeassistant/components/sense/sensor.py index d3cfb8b9db6..7c774ad8f81 100644 --- a/homeassistant/components/sense/sensor.py +++ b/homeassistant/components/sense/sensor.py @@ -251,6 +251,11 @@ class SenseTrendsSensor(Entity): """Return the unit of measurement of this entity, if any.""" return self._unit_of_measurement + @property + def device_state_attributes(self): + """Return the state attributes.""" + return {ATTR_ATTRIBUTION: ATTRIBUTION} + @property def icon(self): """Icon to use in the frontend, if any.""" @@ -320,6 +325,11 @@ class SenseEnergyDevice(Entity): """Return the unit of measurement of this entity.""" return POWER_WATT + @property + def device_state_attributes(self): + """Return the state attributes.""" + return {ATTR_ATTRIBUTION: ATTRIBUTION} + @property def device_class(self): """Return the device class of the power sensor."""