Pi4ioe5v9xxxx from ToggleEntity to SwitchDevice (#34369)

pull/34378/head
Anton Verburg 2020-04-18 16:01:49 +02:00 committed by GitHub
parent 64cd38d96f
commit 44b4f14375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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):