Skip to content

Commit

Permalink
remove dublicate funkcion
Browse files Browse the repository at this point in the history
  • Loading branch information
jontofront committed Jan 11, 2024
1 parent 7a5a4e8 commit 85e4868
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions custom_components/econet300/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@
import logging

from homeassistant.components.binary_sensor import (
BinarySensorEntityDescription,
BinarySensorEntity,
BinarySensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from .entity import EconetEntity
from .common import Econet300Api, EconetDataCoordinator
from .common_functions import camel_to_snake
from .common import EconetDataCoordinator, Econet300Api
from .const import (
DOMAIN,
SERVICE_COORDINATOR,
SERVICE_API,
AVAILABLE_NUMBER_OF_MIXERS,
BINARY_SENSOR_MAP,
DOMAIN,
ENTITY_DEVICE_CLASS_MAP,
ENTITY_ICON,
ENTITY_ICON_OFF,
AVAILABLE_NUMBER_OF_MIXERS,
SERVICE_API,
SERVICE_COORDINATOR,
)
from .entity import EconetEntity

_LOGGER = logging.getLogger(__name__)

Expand All @@ -36,7 +35,6 @@ class EconetBinarySensorEntityDescription(BinarySensorEntityDescription):
availability_key: str = ""



class EconetBinarySensor(EconetEntity, BinarySensorEntity):
"""Econet Binary Sensor"""

Expand Down Expand Up @@ -90,11 +88,6 @@ def create_binary_entity_description(key: str) -> EconetBinarySensorEntityDescri
return entity_description


def can_add_mixer(desc: str, coordinator: EconetDataCoordinator):
"""Check if can add mixer entity"""
return coordinator.has_data(desc) and coordinator.data[desc] is not None


def can_add_mixer(desc: str, coordinator: EconetDataCoordinator):
return coordinator.has_data(desc) and coordinator.data[desc] is not None

Expand Down

0 comments on commit 85e4868

Please sign in to comment.