Skip to content

Commit

Permalink
Fix some spell issues (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvalabou authored Oct 19, 2023
1 parent 1b28764 commit 370b852
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion custom_components/smartthinq_sensors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def _notify_message(

@callback
def _migrate_old_entry_config(hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Migrate an old config entry if availabl."""
"""Migrate an old config entry if available."""
old_key = "outh_url" # old conf key with typo error
if old_key not in entry.data:
return
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartthinq_sensors/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for ThinQ device bynary sensors."""
"""Support for ThinQ device binary sensors."""
from __future__ import annotations

from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartthinq_sensors/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _validate_region_language(region: str, language: str) -> str | None:
return None

def _get_hass_region_lang(self):
"""Get the hass configured region and languange."""
"""Get the hass configured region and language."""
if self._region and self._user_lang:
return
# This works starting from HA 2022.12
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartthinq_sensors/wideq/core_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def gen_uuid() -> str:


class TempUnitConversion:
"""Class to convert teperature unit with LG device conversion rules."""
"""Class to convert temperature unit with LG device conversion rules."""

def __init__(self):
"""Initialize object."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartthinq_sensors/wideq/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ def _get_filter_life(

@property
def has_data(self) -> bool:
"""Check if status cointain valid data."""
"""Check if status contain valid data."""
return bool(self._data)

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartthinq_sensors/wideq/devices/ac.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ def hot_water_target_min_temp(self):

@property
def hot_water_target_max_temp(self):
"""Return AWHP hot water target maximun allowed temperature."""
"""Return AWHP hot water target maximum allowed temperature."""
if not self._device.is_water_heater_supported:
return None
key = self._get_state_key(STATE_HOT_WATER_MAX_TEMP)
Expand Down
10 changes: 5 additions & 5 deletions custom_components/smartthinq_sensors/wideq/devices/microwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async def set_sound(self, turn_on: bool):
# Unit
@property
def defrost_weight_unit_options(self) -> list[str]:
"""Get display scrool speed list."""
"""Get display scroll speed list."""
if self._supported_defrost_weight_unit_options is None:
key = self._get_state_key("MwoSettingDefrostWeightMode")
if not self.model_info.is_enum_type(key):
Expand All @@ -192,7 +192,7 @@ async def set_defrost_weight_unit(self, unit: str):
# Display
@property
def display_scroll_speed_options(self) -> list[str]:
"""Get display scrool speed list."""
"""Get display scroll speed list."""
if self._supported_display_scroll_speed_options is None:
key = self._get_state_key("MwoSettingDisplayScrollSpeed")
if not self.model_info.is_enum_type(key):
Expand All @@ -206,7 +206,7 @@ def display_scroll_speed_options(self) -> list[str]:
return self._supported_display_scroll_speed_options

async def set_display_scroll_speed(self, speed: str):
"""Set display scrool speed."""
"""Set display scroll speed."""
if speed not in self.display_scroll_speed_options:
raise ValueError(f"Invalid display scroll speed: {speed}")

Expand All @@ -218,7 +218,7 @@ async def set_display_scroll_speed(self, speed: str):
# Light
@property
def light_mode_options(self) -> list[str]:
"""Get display scrool speed list."""
"""Get display scroll speed list."""
if self._supported_light_mode_options is None:
key = self._get_state_key("MwoLampLevel")
if not (mapping := self.model_info.enum_range_values(key)):
Expand Down Expand Up @@ -377,7 +377,7 @@ def weight_unit(self):

@property
def display_scroll_speed(self):
"""Get display scrool speed."""
"""Get display scroll speed."""
if (value := self.lookup_enum("MwoSettingDisplayScrollSpeed")) is None:
return None

Expand Down
8 changes: 4 additions & 4 deletions custom_components/smartthinq_sensors/wideq/devices/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def oven_lower_target_temp(self):
else:
return None
status = self.to_int_or_none(self._data.get(key))
if not status: # 0 means not availabe
if not status: # 0 means not available
status = None
return status

Expand All @@ -214,7 +214,7 @@ def oven_upper_target_temp(self):
else:
return None
status = self.to_int_or_none(self._data.get(key))
if not status: # 0 means not availabe
if not status: # 0 means not available
status = None
return status

Expand All @@ -229,7 +229,7 @@ def oven_lower_current_temp(self):
else:
return None
status = self.to_int_or_none(self._data.get(key))
if not status: # 0 means not availabe
if not status: # 0 means not available
status = None
return self._update_feature(
RangeFeatures.OVEN_LOWER_CURRENT_TEMP, status, False, allow_none=True
Expand All @@ -246,7 +246,7 @@ def oven_upper_current_temp(self):
else:
return None
status = self.to_int_or_none(self._data.get(key))
if not status: # 0 means not availabe
if not status: # 0 means not available
status = None
return self._update_feature(
RangeFeatures.OVEN_UPPER_CURRENT_TEMP, status, False, allow_none=True
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartthinq_sensors/wideq/model_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def enum_index(self, key, index) -> str | None:
return options.get(index, "")

def target_key(self, key, value, target) -> str | None:
"""Look up tarket key inside a value."""
"""Look up target key inside a value."""
if not (data := self._data_root(key)):
return None

Expand Down

0 comments on commit 370b852

Please sign in to comment.