Deprecate process component

This commit is contained in:
Paulus Schoutsen 2015-03-08 23:49:06 -07:00
parent 74d243ac41
commit e32c2d2569
3 changed files with 7 additions and 8 deletions

View File

@ -10,7 +10,7 @@ import homeassistant as ha
import homeassistant.bootstrap as bootstrap import homeassistant.bootstrap as bootstrap
import homeassistant.loader as loader import homeassistant.loader as loader
from homeassistant.const import ( from homeassistant.const import (
CONF_PLATFORM, ATTR_ENTITY_PICTURE, STATE_ON, CONF_PLATFORM, ATTR_ENTITY_PICTURE,
CONF_LATITUDE, CONF_LONGITUDE) CONF_LATITUDE, CONF_LONGITUDE)
DOMAIN = "demo" DOMAIN = "demo"
@ -52,9 +52,6 @@ def setup(hass, config):
group.setup_group(hass, 'living room', [lights[0], lights[1], switches[0]]) group.setup_group(hass, 'living room', [lights[0], lights[1], switches[0]])
group.setup_group(hass, 'bedroom', [lights[2], switches[1]]) group.setup_group(hass, 'bedroom', [lights[2], switches[1]])
# Setup process
hass.states.set("process.XBMC", STATE_ON)
# Setup device tracker # Setup device tracker
hass.states.set("device_tracker.Paulus", "home", hass.states.set("device_tracker.Paulus", "home",
{ATTR_ENTITY_PICTURE: {ATTR_ENTITY_PICTURE:

View File

@ -38,9 +38,6 @@
return icon; return icon;
case "process":
return "hardware:memory";
case "sun": case "sun":
return "image:wb-sunny"; return "image:wb-sunny";

View File

@ -7,7 +7,7 @@ on the host machine.
Author: Markus Stenberg <fingon@iki.fi> Author: Markus Stenberg <fingon@iki.fi>
""" """
import logging
import os import os
from homeassistant.const import STATE_ON, STATE_OFF from homeassistant.const import STATE_ON, STATE_OFF
@ -27,6 +27,11 @@ def setup(hass, config):
in process list. in process list.
""" """
# Deprecated as of 3/7/2015
logging.getLogger(__name__).warning(
"This component has been deprecated and will be removed in the future."
" Please use sensor.systemmonitor with the process type")
entities = {ENTITY_ID_FORMAT.format(util.slugify(pname)): pstring entities = {ENTITY_ID_FORMAT.format(util.slugify(pname)): pstring
for pname, pstring in config[DOMAIN].items()} for pname, pstring in config[DOMAIN].items()}