1 parent
e55ce61100
commit
ed2b9e5483
26 files changed
+70
-58
No files matched your search
@@ -2,6 +2,7 @@
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.const import POWER_WATT
|
||||
|
||||
from homeassistant.components.edp_redy import EdpRedyDevice, EDP_REDY
|
||||
|
||||
@@ -29,7 +30,7 @@ async def async_setup_platform(
|
||||
|
||||
# Create a sensor for global active power
|
||||
devices.append(EdpRedySensor(session, ACTIVE_POWER_ID, "Power Home",
|
||||
'mdi:flash', 'W'))
|
||||
'mdi:flash', POWER_WATT))
|
||||
|
||||
async_add_entities(devices, True)
|
||||
|
||||
@@ -89,7 +90,7 @@ class EdpRedyModuleSensor(EdpRedyDevice, Entity):
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit of measurement of this sensor."""
|
||||
return 'W'
|
||||
return POWER_WATT
|
||||
|
||||
async def async_update(self):
|
||||
"""Parse the data for this sensor."""
|
||||
|
||||
Reference in new issue
Block a user