pub async fn watch_stream(
client: &HaClient,
restrict: Option<&str>,
on_event: impl FnMut(HaEvent) -> bool,
) -> Result<(), HaError>Expand description
Stream SSE events from /api/stream, calling on_event for each.
Returns when on_event returns false or the stream ends.