Migrate components to use EntityComponent
This commit is contained in:
1 parent
a9324ba9d4
commit
bbfd97e2b8
7 files changed
+14
-14
No files matched your search
+2
-2
@@ -7,7 +7,7 @@ Helper method for writing tests.
|
||||
import os
|
||||
|
||||
import homeassistant as ha
|
||||
from homeassistant.helpers.device import ToggleDevice
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, DEVICE_DEFAULT_NAME
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class MockModule(object):
|
||||
self.setup = lambda hass, config: False if setup is None else setup
|
||||
|
||||
|
||||
class MockToggleDevice(ToggleDevice):
|
||||
class MockToggleDevice(ToggleEntity):
|
||||
""" Provides a mock toggle device. """
|
||||
def __init__(self, name, state):
|
||||
self._name = name or DEVICE_DEFAULT_NAME
|
||||
|
||||
Reference in new issue
Block a user