mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Use the logger the same way as other platforms do
This commit is contained in:
parent
4f3b3a9e34
commit
9f4a3f4aea
@ -13,9 +13,10 @@ from homeassistant.const import (EVENT_HOMEASSISTANT_STOP,
|
|||||||
from homeassistant.helpers.entity import ToggleEntity
|
from homeassistant.helpers.entity import ToggleEntity
|
||||||
import tellcore.constants as tellcore_constants
|
import tellcore.constants as tellcore_constants
|
||||||
from tellcore.library import DirectCallbackDispatcher
|
from tellcore.library import DirectCallbackDispatcher
|
||||||
SINGAL_REPETITIONS = 1
|
|
||||||
|
|
||||||
|
SINGAL_REPETITIONS = 1
|
||||||
REQUIREMENTS = ['tellcore-py==1.1.2']
|
REQUIREMENTS = ['tellcore-py==1.1.2']
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
@ -24,8 +25,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
try:
|
try:
|
||||||
import tellcore.telldus as telldus
|
import tellcore.telldus as telldus
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logging.getLogger(__name__).exception(
|
_LOGGER.exception("Failed to import tellcore")
|
||||||
"Failed to import tellcore")
|
|
||||||
return
|
return
|
||||||
|
|
||||||
core = telldus.TelldusCore(callback_dispatcher=DirectCallbackDispatcher())
|
core = telldus.TelldusCore(callback_dispatcher=DirectCallbackDispatcher())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user