Added unit_of_measurement to Currencylayer (#10598)

* Added unit_of_measurement to Currencylayer

* Updated based on comments

* Remove quote from name
This commit is contained in:
Alok Saboo 2017-11-17 02:58:46 -05:00 committed by Fabian Affolter
parent 62c8843956
commit 2a77883146

View File

@ -68,10 +68,15 @@ class CurrencylayerSensor(Entity):
self._base = base
self._state = None
@property
def unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
return self._quote
@property
def name(self):
"""Return the name of the sensor."""
return '{} {}'.format(self._base, self._quote)
return self._base
@property
def icon(self):