Add deprecated warning to thermostat and hvac (#2962)

* Add deprecated warning for thermostat and hvac
This commit is contained in:
John Arild Berentsen 2016-08-24 16:30:14 +02:00 committed by GitHub
parent daa066c036
commit 5d2d9af8e3
2 changed files with 6 additions and 0 deletions

View File

@ -135,6 +135,9 @@ def set_swing_mode(hass, swing_mode, entity_id=None):
# pylint: disable=too-many-branches
def setup(hass, config):
"""Setup hvacs."""
_LOGGER.warning('This component has been deprecated in favour of'
' the "climate" component and will be removed '
'in the future. Please upgrade.')
component = EntityComponent(_LOGGER, DOMAIN, hass, SCAN_INTERVAL)
component.setup(config)

View File

@ -115,6 +115,9 @@ def set_hvac_mode(hass, hvac_mode, entity_id=None):
# pylint: disable=too-many-branches
def setup(hass, config):
"""Setup thermostats."""
_LOGGER.warning('This component has been deprecated in favour of'
' the "climate" component and will be removed '
'in the future. Please upgrade.')
component = EntityComponent(_LOGGER, DOMAIN, hass, SCAN_INTERVAL)
component.setup(config)