Migrate components to use EntityComponent

This commit is contained in:
Paulus Schoutsen committed 2015-03-21 19:37:18 -07:00
1 parent a9324ba9d4
commit bbfd97e2b8
7 files changed
+14 -14

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ Component to interface with various switches that can be controlled remotely.
import logging
from datetime import timedelta
from homeassistant.helpers.device_component import DeviceComponent
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.const import (
STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID)
@@ -58,7 +58,7 @@ def turn_off(hass, entity_id=None):
def setup(hass, config):
""" Track states and offer events for switches. """
component = DeviceComponent(
component = EntityComponent(
_LOGGER, DOMAIN, hass, SCAN_INTERVAL, DISCOVERY_PLATFORMS,
GROUP_NAME_ALL_SWITCHES)
component.setup(config)