Rename SwitchDevice to SwitchEntity (#34673)
This commit is contained in:
1 parent
e4333a7a44
commit
066e921a8b
121 files changed
+273
-251
No files matched your search
@@ -6,7 +6,7 @@ from typing import Any, Dict
|
||||
import switchbot
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
|
||||
from homeassistant.const import CONF_MAC, CONF_NAME, CONF_PASSWORD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
@@ -32,7 +32,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
add_entities([SwitchBot(mac_addr, name, password)])
|
||||
|
||||
|
||||
class SwitchBot(SwitchDevice, RestoreEntity):
|
||||
class SwitchBot(SwitchEntity, RestoreEntity):
|
||||
"""Representation of a Switchbot."""
|
||||
|
||||
def __init__(self, mac, name, password) -> None:
|
||||
|
||||
Reference in new issue
Block a user