Pi4ioe5v9xxxx from ToggleEntity to SwitchDevice (#34369)
parent
64cd38d96f
commit
44b4f14375
|
@ -4,10 +4,9 @@ import logging
|
|||
from pi4ioe5v9xxxx import pi4ioe5v9xxxx # pylint: disable=import-error
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA
|
||||
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
|
||||
from homeassistant.const import DEVICE_DEFAULT_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -52,7 +51,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
add_entities(switches)
|
||||
|
||||
|
||||
class Pi4ioe5v9Switch(ToggleEntity):
|
||||
class Pi4ioe5v9Switch(SwitchDevice):
|
||||
"""Representation of a pi4ioe5v9 IO expansion IO."""
|
||||
|
||||
def __init__(self, name, pin, invert_logic):
|
||||
|
|
Loading…
Reference in New Issue