Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
denpamusic committed Dec 24, 2023
1 parent 87a6976 commit 8e4058c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/econet300/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ def icon(self) -> str | None:
)


def create_binary_entity_descritpion(key: str) -> EconetBinarySensorEntityDescription:
def create_binary_entity_description(key: str) -> EconetBinarySensorEntityDescription:
"""Create Econet300 binary entity description"""
map_key = BINARY_SENSOR_MAP.get(key, key)
_LOGGER.debug("create_binary_entity_descritpion: %s", map_key)
_LOGGER.debug("create_binary_entity_description: %s", map_key)
entity_description = EconetBinarySensorEntityDescription(
key=key,
translation_key=camel_to_snake(map_key),
device_class=ENTITY_DEVICE_CLASS_MAP.get(map_key, None),
icon=ENTITY_ICON.get(map_key, None),
icon_off=ENTITY_ICON_OFF.get(map_key, None),
)
_LOGGER.debug("create_binary_entity_descritpion: %s", entity_description)
_LOGGER.debug("create_binary_entity_description: %s", entity_description)
return entity_description


Expand All @@ -100,7 +100,7 @@ def create_binary_sensors(coordinator: EconetDataCoordinator, api: Econet300Api)
_LOGGER.debug("Processing data_key: %s", data_key)
if data_key in BINARY_SENSOR_MAP:
entity = EconetBinarySensor(
create_binary_entity_descritpion(data_key), coordinator, api
create_binary_entity_description(data_key), coordinator, api
)
entities.append(entity)
_LOGGER.debug("Created and appended entity: %s", entity)
Expand Down

0 comments on commit 8e4058c

Please sign in to comment.