Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
657a068
Cleanup some duplicated code (#147439)
karwosts Jun 24, 2025
54e5107
Add total cycles sensor for Litter-Robot (#147435)
natekspencer Jun 24, 2025
0f112bb
Use non-autospec mock for Reolink service tests (#147440)
abmantis Jun 24, 2025
3dc8676
Add TTS streaming to Wyoming satellites (#147438)
synesthesiam Jun 24, 2025
cefc882
Support streaming TTS in wyoming (#147392)
synesthesiam Jun 24, 2025
fe4ff4f
Use non-autospec mock for Reolink switch tests (#147441)
abmantis Jun 24, 2025
abfb7af
Bump pylitterbot to 2024.2.1 (#147443)
natekspencer Jun 24, 2025
3148719
Use newer mock in recent Reolink test (#147448)
abmantis Jun 24, 2025
e8a534b
Add missing method mock to Reolink chime test (#147447)
abmantis Jun 24, 2025
4d98431
Fix nfandroidtv service notify disappears when restarting home assist…
sVnsation Jun 24, 2025
8eb906f
Migrate OpenAI to config subentries (#147282)
balloob Jun 24, 2025
7322fe4
Define fields for assist ask_question action (#147219)
piitaya Jun 24, 2025
265de91
Add type for wiz (#147454)
balloob Jun 24, 2025
ad4fae7
Custom sentence triggers should be marked as processed locally (#145704)
HarvsG Jun 24, 2025
b9fc198
Set quality scale to 🥇 gold for ista EcoTrend integration (#143462)
tr4nt0r Jun 24, 2025
5ef054f
Add quality scale bronze to SamsungTV (#142288)
chemelli74 Jun 24, 2025
5a20ef3
Bump aioshelly to version 13.7.0 (#147453)
bieniu Jun 24, 2025
f735331
Convert Ollama to subentries (#147286)
balloob Jun 24, 2025
9e7c7ec
Flash ZBT-1 and Yellow firmwares from Core instead of using addons (#…
puddly Jun 24, 2025
19b773d
Only send ESPHome intent progress when necessary (#147458)
synesthesiam Jun 24, 2025
c93e45c
Add missing config entry type for Husqvarna (#147455)
balloob Jun 24, 2025
c270ea4
Fix media accept config type (#147445)
balloob Jun 24, 2025
7b8ebb0
Move DevoloMultiLevelSwitchDeviceEntity in devolo Home Control (#147450)
Shutgun Jun 24, 2025
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
1 change: 1 addition & 0 deletions homeassistant/components/assist_pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,7 @@ async def recognize_intent(
) is not None:
# Sentence trigger matched
agent_id = "sentence_trigger"
processed_locally = True
intent_response = intent.IntentResponse(
self.pipeline.conversation_language
)
Expand Down
14 changes: 14 additions & 0 deletions homeassistant/components/assist_satellite/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,17 @@ ask_question:
required: false
selector:
object:
label_field: sentences
description_field: id
multiple: true
translation_key: answers
fields:
id:
required: true
selector:
text:
sentences:
required: true
selector:
text:
multiple: true
8 changes: 8 additions & 0 deletions homeassistant/components/assist_satellite/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,13 @@
}
}
}
},
"selector": {
"answers": {
"fields": {
"id": "Answer ID",
"sentences": "Sentences"
}
}
}
}
25 changes: 4 additions & 21 deletions homeassistant/components/derivative/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,7 @@ def calc_derivative(
"" if unit is None else unit
)

# filter out all derivatives older than `time_window` from our window list
self._state_list = [
(time_start, time_end, state)
for time_start, time_end, state in self._state_list
if (new_state.last_reported - time_end).total_seconds()
< self._time_window
]
self._prune_state_list(new_state.last_reported)

try:
elapsed_time = (
Expand Down Expand Up @@ -380,25 +374,14 @@ def calc_derivative(
(old_last_reported, new_state.last_reported, new_derivative)
)

def calculate_weight(
start: datetime, end: datetime, now: datetime
) -> float:
window_start = now - timedelta(seconds=self._time_window)
if start < window_start:
weight = (end - window_start).total_seconds() / self._time_window
else:
weight = (end - start).total_seconds() / self._time_window
return weight

# If outside of time window just report derivative (is the same as modeling it in the window),
# otherwise take the weighted average with the previous derivatives
if elapsed_time > self._time_window:
derivative = new_derivative
else:
derivative = Decimal("0.00")
for start, end, value in self._state_list:
weight = calculate_weight(start, end, new_state.last_reported)
derivative = derivative + (value * Decimal(weight))
derivative = self._calc_derivative_from_state_list(
new_state.last_reported
)
self._attr_native_value = round(derivative, self._round_digits)
self.async_write_ha_state()

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/devolo_home_control/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

from . import DevoloHomeControlConfigEntry
from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity
from .entity import DevoloMultiLevelSwitchDeviceEntity


async def async_setup_entry(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/devolo_home_control/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

from . import DevoloHomeControlConfigEntry
from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity
from .entity import DevoloMultiLevelSwitchDeviceEntity


async def async_setup_entry(
Expand Down

This file was deleted.

21 changes: 21 additions & 0 deletions homeassistant/components/devolo_home_control/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,24 @@ def _generic_message(self, message: tuple) -> None:
self._attr_available = self._device_instance.is_online()
else:
_LOGGER.debug("No valid message received: %s", message)


class DevoloMultiLevelSwitchDeviceEntity(DevoloDeviceEntity):
"""Representation of a multi level switch device within devolo Home Control. Something like a dimmer or a thermostat."""

_attr_name = None

def __init__(
self, homecontrol: HomeControl, device_instance: Zwave, element_uid: str
) -> None:
"""Initialize a multi level switch within devolo Home Control."""
super().__init__(
homecontrol=homecontrol,
device_instance=device_instance,
element_uid=element_uid,
)
self._multi_level_switch_property = device_instance.multi_level_switch_property[
element_uid
]

self._value = self._multi_level_switch_property.value
2 changes: 1 addition & 1 deletion homeassistant/components/devolo_home_control/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

from . import DevoloHomeControlConfigEntry
from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity
from .entity import DevoloMultiLevelSwitchDeviceEntity


async def async_setup_entry(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/devolo_home_control/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

from . import DevoloHomeControlConfigEntry
from .devolo_multi_level_switch import DevoloMultiLevelSwitchDeviceEntity
from .entity import DevoloMultiLevelSwitchDeviceEntity


async def async_setup_entry(
Expand Down
14 changes: 9 additions & 5 deletions homeassistant/components/esphome/assist_satellite.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,15 @@ def on_pipeline_event(self, event: PipelineEvent) -> None:
assert event.data is not None
data_to_send = {"text": event.data["stt_output"]["text"]}
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS:
data_to_send = {
"tts_start_streaming": "1"
if (event.data and event.data.get("tts_start_streaming"))
else "0",
}
if (
not event.data
or ("tts_start_streaming" not in event.data)
or (not event.data["tts_start_streaming"])
):
# ESPHome only needs to know if early TTS streaming is available
return

data_to_send = {"tts_start_streaming": "1"}
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_END:
assert event.data is not None
data_to_send = {
Expand Down
Loading
Loading