diff --git a/homeassistant/components/august/__init__.py b/homeassistant/components/august/__init__.py index 249d9e51a85..8d1f54f4a4a 100644 --- a/homeassistant/components/august/__init__.py +++ b/homeassistant/components/august/__init__.py @@ -341,7 +341,7 @@ class AugustData(AugustSubscriberMixin): ) async def async_status_async(self, device_id, hyper_bridge): - """Request status of the the device but do not wait for a response since it will come via pubnub.""" + """Request status of the device but do not wait for a response since it will come via pubnub.""" return await self._async_call_api_op_requires_bridge( device_id, self._api.async_status_async, diff --git a/homeassistant/components/camera/__init__.py b/homeassistant/components/camera/__init__.py index 51e874ef3b7..803abefef00 100644 --- a/homeassistant/components/camera/__init__.py +++ b/homeassistant/components/camera/__init__.py @@ -773,7 +773,7 @@ class CameraMjpegStream(CameraView): # Compose camera stream from stills interval = float(interval_str) if interval < MIN_STREAM_INTERVAL: - raise ValueError(f"Stream interval must be be > {MIN_STREAM_INTERVAL}") + raise ValueError(f"Stream interval must be > {MIN_STREAM_INTERVAL}") return await camera.handle_async_still_stream(request, interval) except ValueError as err: raise web.HTTPBadRequest() from err diff --git a/homeassistant/components/econet/__init__.py b/homeassistant/components/econet/__init__.py index 981d6cbad23..6b312de8b0a 100644 --- a/homeassistant/components/econet/__init__.py +++ b/homeassistant/components/econet/__init__.py @@ -131,7 +131,7 @@ class EcoNetEntity(Entity): @property def available(self): - """Return if the the device is online or not.""" + """Return if the device is online or not.""" return self._econet.connected @property diff --git a/homeassistant/components/evohome/__init__.py b/homeassistant/components/evohome/__init__.py index 9c46ff43032..b4010c435ee 100644 --- a/homeassistant/components/evohome/__init__.py +++ b/homeassistant/components/evohome/__init__.py @@ -188,7 +188,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: tokens = dict(app_storage or {}) if tokens.pop(CONF_USERNAME, None) != config[DOMAIN][CONF_USERNAME]: - # any tokens won't be valid, and store might be be corrupt + # any tokens won't be valid, and store might be corrupt await store.async_save({}) return ({}, None) diff --git a/homeassistant/components/fully_kiosk/coordinator.py b/homeassistant/components/fully_kiosk/coordinator.py index fbd08f8d2c5..4e35d614587 100644 --- a/homeassistant/components/fully_kiosk/coordinator.py +++ b/homeassistant/components/fully_kiosk/coordinator.py @@ -1,4 +1,4 @@ -"""Provides the The Fully Kiosk Browser DataUpdateCoordinator.""" +"""Provides the Fully Kiosk Browser DataUpdateCoordinator.""" import asyncio from typing import Any, cast diff --git a/homeassistant/components/group/__init__.py b/homeassistant/components/group/__init__.py index bdf295e35ae..0ed293ea777 100644 --- a/homeassistant/components/group/__init__.py +++ b/homeassistant/components/group/__init__.py @@ -767,7 +767,7 @@ class Group(Entity): self._see_state(state) def _see_state(self, new_state: State) -> None: - """Keep track of the the state.""" + """Keep track of the state.""" entity_id = new_state.entity_id domain = new_state.domain state = new_state.state diff --git a/homeassistant/components/homekit/type_lights.py b/homeassistant/components/homekit/type_lights.py index 65c0368f6e6..83ce1c3f6cf 100644 --- a/homeassistant/components/homekit/type_lights.py +++ b/homeassistant/components/homekit/type_lights.py @@ -249,7 +249,7 @@ class Light(HomeAccessory): # But if it is set to 0, HomeKit will update the brightness to 100 as # it thinks 0 is off. # - # Therefore, if the the brightness is 0 and the device is still on, + # Therefore, if the brightness is 0 and the device is still on, # the brightness is mapped to 1 otherwise the update is ignored in # order to avoid this incorrect behavior. if brightness == 0 and state == STATE_ON: diff --git a/homeassistant/components/homekit/type_thermostats.py b/homeassistant/components/homekit/type_thermostats.py index a924548816b..d7bee679369 100644 --- a/homeassistant/components/homekit/type_thermostats.py +++ b/homeassistant/components/homekit/type_thermostats.py @@ -405,7 +405,7 @@ class Thermostat(HomeAccessory): if target_hc not in self.hc_homekit_to_hass: # If the target heating cooling state we want does not # exist on the device, we have to sort it out - # based on the the current and target temperature since + # based on the current and target temperature since # siri will always send HC_HEAT_COOL_AUTO in this case # and hope for the best. hc_target_temp = char_values.get(CHAR_TARGET_TEMPERATURE) diff --git a/homeassistant/components/honeywell/__init__.py b/homeassistant/components/honeywell/__init__.py index 146b8e3c035..143b485a80f 100644 --- a/homeassistant/components/honeywell/__init__.py +++ b/homeassistant/components/honeywell/__init__.py @@ -90,7 +90,7 @@ async def update_listener(hass: HomeAssistant, config_entry: ConfigEntry) -> Non async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool: - """Unload the config config and platforms.""" + """Unload the config and platforms.""" unload_ok = await hass.config_entries.async_unload_platforms( config_entry, PLATFORMS ) diff --git a/homeassistant/components/hyperion/__init__.py b/homeassistant/components/hyperion/__init__.py index ec478883e8f..8179b9b5188 100644 --- a/homeassistant/components/hyperion/__init__.py +++ b/homeassistant/components/hyperion/__init__.py @@ -241,7 +241,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: instance_name, ) - # Remove entities that are are not running instances on Hyperion. + # Remove entities that are not running instances on Hyperion. for instance_num in set(existing_instances) - running_instances: del existing_instances[instance_num] async_dispatcher_send( diff --git a/homeassistant/components/iaqualink/const.py b/homeassistant/components/iaqualink/const.py index 7cabfa2b4f6..ef939e3fc52 100644 --- a/homeassistant/components/iaqualink/const.py +++ b/homeassistant/components/iaqualink/const.py @@ -1,4 +1,4 @@ -"""Constants for the the iaqualink component.""" +"""Constants for the iaqualink component.""" from datetime import timedelta DOMAIN = "iaqualink" diff --git a/homeassistant/components/insteon/services.yaml b/homeassistant/components/insteon/services.yaml index c2cd5ee9d25..164c917c793 100644 --- a/homeassistant/components/insteon/services.yaml +++ b/homeassistant/components/insteon/services.yaml @@ -1,6 +1,6 @@ add_all_link: name: Add all link - description: Tells the Insteom Modem (IM) start All-Linking mode. Once the the IM is in All-Linking mode, press the link button on the device to complete All-Linking. + description: Tells the Insteom Modem (IM) start All-Linking mode. Once the IM is in All-Linking mode, press the link button on the device to complete All-Linking. fields: group: name: Group diff --git a/homeassistant/components/lutron_caseta/__init__.py b/homeassistant/components/lutron_caseta/__init__.py index 5ee64a687bf..b9418373b38 100644 --- a/homeassistant/components/lutron_caseta/__init__.py +++ b/homeassistant/components/lutron_caseta/__init__.py @@ -499,7 +499,7 @@ def _async_subscribe_keypad_events( async def async_unload_entry( hass: HomeAssistant, entry: config_entries.ConfigEntry ) -> bool: - """Unload the bridge bridge from a config entry.""" + """Unload the bridge from a config entry.""" data: LutronCasetaData = hass.data[DOMAIN][entry.entry_id] await data.bridge.close() if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS): diff --git a/homeassistant/components/nmbs/sensor.py b/homeassistant/components/nmbs/sensor.py index 51d2ae3c082..1d5bb3ef30b 100644 --- a/homeassistant/components/nmbs/sensor.py +++ b/homeassistant/components/nmbs/sensor.py @@ -174,7 +174,7 @@ class NMBSLiveBoard(SensorEntity): class NMBSSensor(SensorEntity): - """Get the the total travel time for a given connection.""" + """Get the total travel time for a given connection.""" _attr_attribution = "https://api.irail.be/" _attr_native_unit_of_measurement = TIME_MINUTES diff --git a/homeassistant/components/samsungtv/config_flow.py b/homeassistant/components/samsungtv/config_flow.py index d7ad62bdf7a..bc8cc895849 100644 --- a/homeassistant/components/samsungtv/config_flow.py +++ b/homeassistant/components/samsungtv/config_flow.py @@ -467,7 +467,7 @@ class SamsungTVConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): await self._async_get_and_check_device_info() # The UDN provided by the ssdp discovery doesn't always match the UDN - # from the device_info, used by the the other methods so we need to + # from the device_info, used by the other methods so we need to # ensure the device_info is loaded before setting the unique_id await self._async_set_unique_id_from_udn() self._async_update_and_abort_for_matching_unique_id() diff --git a/homeassistant/components/samsungtv/strings.json b/homeassistant/components/samsungtv/strings.json index d0f4526335a..e67b50fae78 100644 --- a/homeassistant/components/samsungtv/strings.json +++ b/homeassistant/components/samsungtv/strings.json @@ -16,7 +16,7 @@ "description": "[%key:component::samsungtv::config::step::confirm::description%]" }, "reauth_confirm": { - "description": "After submitting, accept the the popup on {device} requesting authorization within 30 seconds or input PIN." + "description": "After submitting, accept the popup on {device} requesting authorization within 30 seconds or input PIN." }, "encrypted_pairing": { "description": "Please enter the PIN displayed on {device}." diff --git a/homeassistant/components/samsungtv/translations/en.json b/homeassistant/components/samsungtv/translations/en.json index c4e0e181090..4e7af766199 100644 --- a/homeassistant/components/samsungtv/translations/en.json +++ b/homeassistant/components/samsungtv/translations/en.json @@ -26,7 +26,7 @@ "description": "Do you want to set up {device}? If you never connected Home Assistant before you should see a popup on your TV asking for authorization." }, "reauth_confirm": { - "description": "After submitting, accept the the popup on {device} requesting authorization within 30 seconds or input PIN." + "description": "After submitting, accept the popup on {device} requesting authorization within 30 seconds or input PIN." }, "reauth_confirm_encrypted": { "description": "Please enter the PIN displayed on {device}." diff --git a/homeassistant/components/sonos/helpers.py b/homeassistant/components/sonos/helpers.py index 9e8fcbd6a12..552d104786e 100644 --- a/homeassistant/components/sonos/helpers.py +++ b/homeassistant/components/sonos/helpers.py @@ -94,7 +94,7 @@ def soco_error( def _find_target_identifier(instance: Any, fallback_soco: SoCo | None) -> str | None: - """Extract the the best available target identifier from the provided instance object.""" + """Extract the best available target identifier from the provided instance object.""" if entity_id := getattr(instance, "entity_id", None): # SonosEntity instance return entity_id diff --git a/homeassistant/components/switchbot/__init__.py b/homeassistant/components/switchbot/__init__.py index 455f9f57ecc..1150fe82bc5 100644 --- a/homeassistant/components/switchbot/__init__.py +++ b/homeassistant/components/switchbot/__init__.py @@ -63,7 +63,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: assert entry.unique_id is not None hass.data.setdefault(DOMAIN, {}) if CONF_ADDRESS not in entry.data and CONF_MAC in entry.data: - # Bleak uses addresses not mac addresses which are are actually + # Bleak uses addresses not mac addresses which are actually # UUIDs on some platforms (MacOS). mac = entry.data[CONF_MAC] if "-" not in mac: diff --git a/homeassistant/components/utility_meter/__init__.py b/homeassistant/components/utility_meter/__init__.py index ea5fb4933be..c436ea757ac 100644 --- a/homeassistant/components/utility_meter/__init__.py +++ b/homeassistant/components/utility_meter/__init__.py @@ -62,10 +62,10 @@ def period_or_cron(config): def max_28_days(config): - """Check that time period does not include more then 28 days.""" + """Check that time period does not include more than 28 days.""" if config.days >= 28: raise vol.Invalid( - "Unsupported offset of more then 28 days, please use a cron pattern." + "Unsupported offset of more than 28 days, please use a cron pattern." ) return config diff --git a/homeassistant/components/venstar/__init__.py b/homeassistant/components/venstar/__init__.py index b543f6d947a..c8e40ccc332 100644 --- a/homeassistant/components/venstar/__init__.py +++ b/homeassistant/components/venstar/__init__.py @@ -56,7 +56,7 @@ async def async_setup_entry(hass: HomeAssistant, config: ConfigEntry) -> bool: async def async_unload_entry(hass: HomeAssistant, config: ConfigEntry) -> bool: - """Unload the config config and platforms.""" + """Unload the config and platforms.""" unload_ok = await hass.config_entries.async_unload_platforms(config, PLATFORMS) if unload_ok: hass.data[DOMAIN].pop(config.entry_id) diff --git a/homeassistant/components/yamaha_musiccast/media_player.py b/homeassistant/components/yamaha_musiccast/media_player.py index 0a6203eddf2..b09d6206d05 100644 --- a/homeassistant/components/yamaha_musiccast/media_player.py +++ b/homeassistant/components/yamaha_musiccast/media_player.py @@ -653,7 +653,7 @@ class MusicCastMediaPlayer(MusicCastDeviceEntity, MediaPlayerEntity): @property def musiccast_zone_entity(self) -> MusicCastMediaPlayer: - """Return the the entity of the zone, which is using MusicCast at the moment, if there is one, self else. + """Return the entity of the zone, which is using MusicCast at the moment, if there is one, self else. It is possible that multiple zones use MusicCast as client at the same time. In this case the first one is returned. diff --git a/homeassistant/helpers/event.py b/homeassistant/helpers/event.py index b553b855be1..f56009dd264 100644 --- a/homeassistant/helpers/event.py +++ b/homeassistant/helpers/event.py @@ -729,7 +729,7 @@ def async_track_template( ], variables: TemplateVarsType | None = None, ) -> CALLBACK_TYPE: - """Add a listener that fires when a a template evaluates to 'true'. + """Add a listener that fires when a template evaluates to 'true'. Listen for the result of the template becoming true, or a true-like string result, such as 'On', 'Open', or 'Yes'. If the template results diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index 5fc0fdc4706..66a042dbb3d 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -1538,7 +1538,7 @@ class Script: self, update_state: bool = True, spare: _ScriptRun | None = None ) -> None: """Stop running script.""" - # Collect a a list of script runs to stop. This must be done before calling + # Collect a list of script runs to stop. This must be done before calling # asyncio.shield as asyncio.shield yields to the event loop, which would cause # us to wait for script runs added after the call to async_stop. aws = [ diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index 81ceada0bf2..1287857731d 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -1675,7 +1675,7 @@ def average(*args: Any, default: Any = _SENTINEL) -> Any: if len(args) == 0: raise TypeError("average expected at least 1 argument, got 0") - # If first argument is iterable and more then 1 argument provided but not a named default, + # If first argument is iterable and more than 1 argument provided but not a named default, # then use 2nd argument as default. if isinstance(args[0], Iterable): average_list = args[0] diff --git a/homeassistant/util/__init__.py b/homeassistant/util/__init__.py index 315c8ebda74..eb3dabe75a0 100644 --- a/homeassistant/util/__init__.py +++ b/homeassistant/util/__init__.py @@ -105,7 +105,7 @@ class Throttle: """A class for throttling the execution of tasks. This method decorator adds a cooldown to a method to prevent it from being - called more then 1 time within the timedelta interval `min_time` after it + called more than 1 time within the timedelta interval `min_time` after it returned its result. Calling a method a second time during the interval will return None. diff --git a/homeassistant/util/async_.py b/homeassistant/util/async_.py index e9c5a41062e..796e3b7c02e 100644 --- a/homeassistant/util/async_.py +++ b/homeassistant/util/async_.py @@ -100,7 +100,7 @@ def check_loop( """Warn if called inside the event loop. Raise if `strict` is True. The default advisory message is 'Use `await hass.async_add_executor_job()' - Set `advise_msg` to an alternate message if the the solution differs. + Set `advise_msg` to an alternate message if the solution differs. """ try: get_running_loop()