Maintenance (sensor.currencylayer, sensor.fixer) (#4103)

* Add new const (base)

* Use constant

* Remove second error message, use const, add attribution, add link
to docs, remove unused vars, and a little simplification

* Add quote

* Use const

* Add attribution, simplify the code, and use consts
This commit is contained in:
Fabian Affolter authored and Paulus Schoutsen committed 2016-10-29 13:27:02 -07:00
1 parent 892f455aee
commit 54d19e3c53
4 files changed
+74 -58

No files matched your search

+1 -2
View File
@@ -10,7 +10,7 @@ from datetime import timedelta
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME, ATTR_ATTRIBUTION
from homeassistant.const import (CONF_NAME, ATTR_ATTRIBUTION, CONF_BASE)
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
import homeassistant.helpers.config_validation as cv
@@ -24,7 +24,6 @@ ATTR_EXCHANGE_RATE = 'Exchange rate'
ATTR_TARGET = 'Target currency'
CONF_ATTRIBUTION = "Data provided by the European Central Bank (ECB)"
CONF_BASE = 'base'
CONF_TARGET = 'target'
DEFAULT_BASE = 'USD'