Getting the latest from balloob
This commit is contained in:
jamespcole committed 2015-03-08 22:08:03 +11:00
commit a30d1dcfef
47 files changed
+1070 -822

No files matched your search

+1 -9
View File
@@ -10,7 +10,6 @@ from homeassistant.helpers.device_component import DeviceComponent
from homeassistant.const import (
STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID)
from homeassistant.helpers import extract_entity_ids
from homeassistant.components import group, discovery, wink
DOMAIN = 'switch'
@@ -64,16 +63,9 @@ def setup(hass, config):
GROUP_NAME_ALL_SWITCHES)
component.setup(config)
switches = component.devices
def handle_switch_service(service):
""" Handles calls to the switch services. """
target_switches = [switches[entity_id] for entity_id
in extract_entity_ids(hass, service)
if entity_id in switches]
if not target_switches:
target_switches = switches.values()
target_switches = component.extract_from_service(service)
for switch in target_switches:
if service.service == SERVICE_TURN_ON:
+1 -1
View File
@@ -1,5 +1,5 @@
""" Demo platform that has two fake switchces. """
from homeassistant.helpers import ToggleDevice
from homeassistant.helpers.device import ToggleDevice
from homeassistant.const import STATE_ON, STATE_OFF, DEVICE_DEFAULT_NAME
+1 -1
View File
@@ -3,7 +3,7 @@ import logging
from homeassistant.const import ATTR_FRIENDLY_NAME
from homeassistant.helpers import ToggleDevice
from homeassistant.helpers.device import ToggleDevice
import tellcore.constants as tellcore_constants
+1 -1
View File
@@ -1,7 +1,7 @@
""" Support for WeMo switchces. """
import logging
from homeassistant.helpers import ToggleDevice
from homeassistant.helpers.device import ToggleDevice
from homeassistant.components.switch import (
ATTR_TODAY_MWH, ATTR_CURRENT_POWER_MWH)