Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions homeassistant/components/bluetooth/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"bleak-retry-connector==4.4.3",
"bluetooth-adapters==2.1.0",
"bluetooth-auto-recovery==1.5.3",
"bluetooth-data-tools==1.28.2",
"dbus-fast==2.44.3",
"habluetooth==5.6.4"
"bluetooth-data-tools==1.28.3",
"dbus-fast==2.44.5",
"habluetooth==5.7.0"
]
}
2 changes: 1 addition & 1 deletion homeassistant/components/dhcp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"requirements": [
"aiodhcpwatcher==1.2.1",
"aiodiscover==2.7.1",
"cached-ipaddress==0.10.0"
"cached-ipaddress==1.0.1"
]
}
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"requirements": [
"aioesphomeapi==41.11.0",
"esphome-dashboard-api==1.3.0",
"bleak-esphome==3.3.0"
"bleak-esphome==3.4.0"
],
"zeroconf": ["_esphomelib._tcp.local."]
}
2 changes: 1 addition & 1 deletion homeassistant/components/homekit/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"loggers": ["pyhap"],
"requirements": [
"HAP-python==5.0.0",
"fnv-hash-fast==1.5.0",
"fnv-hash-fast==1.6.0",
"PyQRCode==1.2.1",
"base36==0.1.1"
],
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ld2410_ble/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"documentation": "https://www.home-assistant.io/integrations/ld2410_ble",
"integration_type": "device",
"iot_class": "local_push",
"requirements": ["bluetooth-data-tools==1.28.2", "ld2410-ble==0.1.1"]
"requirements": ["bluetooth-data-tools==1.28.3", "ld2410-ble==0.1.1"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/led_ble/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"dependencies": ["bluetooth_adapters"],
"documentation": "https://www.home-assistant.io/integrations/led_ble",
"iot_class": "local_polling",
"requirements": ["bluetooth-data-tools==1.28.2", "led-ble==1.1.7"]
"requirements": ["bluetooth-data-tools==1.28.3", "led-ble==1.1.7"]
}
5 changes: 4 additions & 1 deletion homeassistant/components/mqtt/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def _message_received(self, msg: ReceiveMessage) -> None:
return
if payload == self._config[CONF_PAYLOAD_RESET]:
# Reset the state to `unknown`
self._attr_is_locked = None
self._attr_is_locked = self._attr_is_locking = None
self._attr_is_unlocking = None
self._attr_is_open = self._attr_is_opening = None
self._attr_is_jammed = None
elif payload in self._valid_states:
self._attr_is_locked = payload == self._config[CONF_STATE_LOCKED]
self._attr_is_locking = payload == self._config[CONF_STATE_LOCKING]
Expand Down
15 changes: 13 additions & 2 deletions homeassistant/components/onedrive/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
from .coordinator import OneDriveConfigEntry

_LOGGER = logging.getLogger(__name__)
UPLOAD_CHUNK_SIZE = 32 * 320 * 1024 # 10.4MB
MAX_CHUNK_SIZE = 60 * 1024 * 1024 # largest chunk possible, must be <= 60 MiB
TARGET_CHUNKS = 20
TIMEOUT = ClientTimeout(connect=10, total=43200) # 12 hours
METADATA_VERSION = 2
CACHE_TTL = 300
Expand Down Expand Up @@ -161,11 +162,21 @@ async def async_upload_backup(
self._folder_id,
await open_stream(),
)

# determine chunk based on target chunks
upload_chunk_size = backup.size / TARGET_CHUNKS
# find the nearest multiple of 320KB
upload_chunk_size = round(upload_chunk_size / (320 * 1024)) * (320 * 1024)
# limit to max chunk size
upload_chunk_size = min(upload_chunk_size, MAX_CHUNK_SIZE)
# ensure minimum chunk size of 320KB
upload_chunk_size = max(upload_chunk_size, 320 * 1024)

try:
backup_file = await LargeFileUploadClient.upload(
self._token_function,
file,
upload_chunk_size=UPLOAD_CHUNK_SIZE,
upload_chunk_size=upload_chunk_size,
session=async_get_clientsession(self._hass),
)
except HashMismatchError as err:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/private_ble_device/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"dependencies": ["bluetooth_adapters"],
"documentation": "https://www.home-assistant.io/integrations/private_ble_device",
"iot_class": "local_push",
"requirements": ["bluetooth-data-tools==1.28.2"]
"requirements": ["bluetooth-data-tools==1.28.3"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/recorder/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"quality_scale": "internal",
"requirements": [
"SQLAlchemy==2.0.41",
"fnv-hash-fast==1.5.0",
"fnv-hash-fast==1.6.0",
"psutil-home-assistant==0.0.1"
]
}
7 changes: 2 additions & 5 deletions homeassistant/helpers/debounce.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,8 @@ def _async_schedule_or_call_now(self) -> bool:

return False

# Locked means a call is in progress. Any call is good, so abort.
if self._execute_lock.locked():
return False

if not self.immediate:
# If not immediate or in progress, we schedule a call for later.
if not self.immediate or self._execute_lock.locked():
self._execute_at_end_of_timer = True
self._schedule_timer()
return False
Expand Down
5 changes: 3 additions & 2 deletions homeassistant/helpers/template/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,15 +561,16 @@ def _render_template() -> None:
finally:
self.hass.loop.call_soon_threadsafe(finish_event.set)

template_render_thread = ThreadWithException(target=_render_template)
try:
template_render_thread = ThreadWithException(target=_render_template)
template_render_thread.start()
async with asyncio.timeout(timeout):
await finish_event.wait()
if self._exc_info:
raise TemplateError(self._exc_info[1].with_traceback(self._exc_info[2]))
except TimeoutError:
template_render_thread.raise_exc(TimeoutError)
if template_render_thread.is_alive():
template_render_thread.raise_exc(TimeoutError)
return True
finally:
template_render_thread.join()
Expand Down
12 changes: 6 additions & 6 deletions homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aiohttp==3.12.15
aiohttp_cors==0.8.1
aiousbwatcher==1.1.1
aiozoneinfo==0.2.3
annotatedyaml==0.4.5
annotatedyaml==1.0.2
astral==2.2
async-interrupt==1.2.2
async-upnp-client==0.45.0
Expand All @@ -24,18 +24,18 @@ bleak-retry-connector==4.4.3
bleak==1.0.1
bluetooth-adapters==2.1.0
bluetooth-auto-recovery==1.5.3
bluetooth-data-tools==1.28.2
cached-ipaddress==0.10.0
bluetooth-data-tools==1.28.3
cached-ipaddress==1.0.1
certifi>=2021.5.30
ciso8601==2.3.3
cronsim==2.6
cryptography==46.0.2
dbus-fast==2.44.3
dbus-fast==2.44.5
file-read-backwards==2.0.0
fnv-hash-fast==1.5.0
fnv-hash-fast==1.6.0
go2rtc-client==0.2.1
ha-ffmpeg==3.2.2
habluetooth==5.6.4
habluetooth==5.7.0
hass-nabucasa==1.2.0
hassil==3.2.0
home-assistant-bluetooth==1.13.1
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
"aiohttp-fast-zlib==0.3.0",
"aiohttp-asyncmdnsresolver==0.1.1",
"aiozoneinfo==0.2.3",
"annotatedyaml==0.4.5",
"annotatedyaml==1.0.2",
"astral==2.2",
"async-interrupt==1.2.2",
"attrs==25.3.0",
Expand All @@ -44,7 +44,7 @@ dependencies = [
"certifi>=2021.5.30",
"ciso8601==2.3.3",
"cronsim==2.6",
"fnv-hash-fast==1.5.0",
"fnv-hash-fast==1.6.0",
# hass-nabucasa is imported by helpers which don't depend on the cloud
# integration
"hass-nabucasa==1.2.0",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tests/components/mqtt/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"state_opening": "opening",
"state_unlocked": "unlocked",
"state_unlocking": "unlocking",
"state_jammed": "jammed",
}
}
}
Expand All @@ -89,6 +90,7 @@
(CONFIG_WITH_STATES, "opening", LockState.OPENING),
(CONFIG_WITH_STATES, "unlocked", LockState.UNLOCKED),
(CONFIG_WITH_STATES, "unlocking", LockState.UNLOCKING),
(CONFIG_WITH_STATES, "jammed", LockState.JAMMED),
],
)
async def test_controlling_state_via_topic(
Expand All @@ -111,6 +113,12 @@ async def test_controlling_state_via_topic(
state = hass.states.get("lock.test")
assert state.state == lock_state

async_fire_mqtt_message(hass, "state-topic", "None")
await hass.async_block_till_done()

state = hass.states.get("lock.test")
assert state.state == STATE_UNKNOWN


@pytest.mark.parametrize(
("hass_config", "payload", "lock_state"),
Expand Down
Loading
Loading