From e32c2d25690af23a1a9e6c9b594d475ace595d64 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 8 Mar 2015 23:49:06 -0700 Subject: [PATCH] Deprecate process component --- homeassistant/components/demo.py | 5 +---- .../www_static/polymer/components/domain-icon.html | 3 --- homeassistant/components/process.py | 7 ++++++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/demo.py b/homeassistant/components/demo.py index 8d52210dd23..9c3e699b113 100644 --- a/homeassistant/components/demo.py +++ b/homeassistant/components/demo.py @@ -10,7 +10,7 @@ import homeassistant as ha import homeassistant.bootstrap as bootstrap import homeassistant.loader as loader from homeassistant.const import ( - CONF_PLATFORM, ATTR_ENTITY_PICTURE, STATE_ON, + CONF_PLATFORM, ATTR_ENTITY_PICTURE, CONF_LATITUDE, CONF_LONGITUDE) 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, 'bedroom', [lights[2], switches[1]]) - # Setup process - hass.states.set("process.XBMC", STATE_ON) - # Setup device tracker hass.states.set("device_tracker.Paulus", "home", {ATTR_ENTITY_PICTURE: diff --git a/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html b/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html index 42be1b32963..50c5157eb2f 100644 --- a/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html +++ b/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html @@ -38,9 +38,6 @@ return icon; - case "process": - return "hardware:memory"; - case "sun": return "image:wb-sunny"; diff --git a/homeassistant/components/process.py b/homeassistant/components/process.py index b356532af7e..21343aa977b 100644 --- a/homeassistant/components/process.py +++ b/homeassistant/components/process.py @@ -7,7 +7,7 @@ on the host machine. Author: Markus Stenberg """ - +import logging import os from homeassistant.const import STATE_ON, STATE_OFF @@ -27,6 +27,11 @@ def setup(hass, config): 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 for pname, pstring in config[DOMAIN].items()}